vi(1) and ISO 8859-1
guru at unixarea.de
Thu Apr 4 19:06:54 UTC 2019
El día Thursday, April 04, 2019 a las 07:14:49PM +0200, Rocky Hotas escribió:
> I have an ISO-8859-1 text file, which is opened and shared by several OSs.
> If I open it with vi(1) in FreeBSD 12.0, its encoding is not detected and
> UTF-8 is used, instead. Any non-ascii character will be read and written
> incorrectly in UTF-8, creating an ambiguous encoding.
Are you sure that the file is completely ISO-8859-1 encoded? What does
file(1) says about and what happens if you run it through iconv(1)
translating from ISO-8859-1 to UTF-8 into /dev/null, will iconv(1) do it
Matthias Apitz, ✉ guru at unixarea.de, http://www.unixarea.de/ +49-176-38902045
Public GnuPG key: http://www.unixarea.de/key.pub
70 years of NATO - 70 years of wars (Jugoslavia, Afghanistan, Syria, ...) and 70 years
of war preparation against Russia. -- PEACE instead of NATO !
More information about the freebsd-questions