Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 May 2020 20:23:07 -0700
From:      "Ronald F. Guilmette" <rfg@tristatelogic.com>
To:        Yuri Pankov <ypankov@fastmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: (character) Conversion error (in vi) ?
Message-ID:  <72824.1589685787@segfault.tristatelogic.com>
In-Reply-To: <ec8735ff-fcf1-7ee4-1aed-4aa9b87c655c@fastmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In message <ec8735ff-fcf1-7ee4-1aed-4aa9b87c655c@fastmail.com>, 
Yuri Pankov <ypankov@fastmail.com> wrote:

>No, it's not that bug after all.  The issue is that (n)vi now (for quite 
>some time :-) defaults to UTF-8 when it can't reliably detect the file 
>encoding, so you'll just have to help it a bit adding the following to 
>~/.nexrc:
>
>set fileencoding=iso8859-1
>
>This way (n)vi will check if file encoding looks like UTF-8, and if not, 
>it will use ISO8859-1 as fallback.

Ahhhhhh... I did what you said and yes, that fixed it!

Thanks ever so much!  This has been bugging me fofr quite awile.

And my apologies for being to lazy/preoccupied to dredge deeply
enough into the man pages to be able to find this solution on
my own.

If you were my fairy godmother, then I'd ask you to grant me
one more wish, which would be to have (n)vi always be able to
automagically correctly detect the content encoding in any given
file it is asked to load.  But you're not, so I won't. :-)

Still, it seems like it out to be possible to do.  It appears
that a hnuman (you) didn't have much trouble figuring out the
correct encoding type in this instance, so one would think
that this one piece of software might be able to do a better
job in this particular guessing game.  (Should I bother to
submit a PR / enhancement request for that?)


Regards,
rfg



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?72824.1589685787>