Date: Fri, 11 Sep 2015 12:45:09 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 203040] Nvi truncates files with non-ASCII characters Message-ID: <bug-203040-8@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D203040 Bug ID: 203040 Summary: Nvi truncates files with non-ASCII characters Product: Base System Version: 10.2-STABLE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: freebsd-bugs@FreeBSD.org Reporter: bjornr@iceland2000.com Created attachment 160929 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D160929&action= =3Dedit ISO-8859 file containing ;=C3=B0;; string, which Nvi will not load Nvi 2.1.2 (from FreeBSD 10.0 to FreeBSD 10.2) displays this behaviour in our system, when a certain character composition appears in a file - the file w= ill be truncated from that line, with a false EOF placed in the line, making the file unusable. A file with non-ASCII characters (like eth) can be created to verify the problem: ;=C3=B0;; (the file should be ISO8859, the login.conf has lang, charset and lc_all se= t to iso-8859-1, added to default: :charset=3DISO8859-1:\ :lang=3Dis_IS.ISO8859-1:\ :lc_all=3Dis_IS.ISO8859-1: \ The client terminal is set to ISO or Western-1252). A file, which contains only ;=C3=B0; will not be truncated. After saving and re-opening the file, the fileencoding will be set to utf-8= , by Nvi. vi will display file with multiple lines like after re-opening: line 1 line 2 line 3 ~ line 5 line 4 was ;=C3=B0;; when the file was created, and after re-opening the fi= le content after ~ is unusable. Other strings like =C3=B0 ; will also break. N= ot all non-ASCII characters will do this, =C3=BD will be ok, but =C3=A1 will not..= . (y acute, a acute) Replacing vi with Nvi 1.79 from FreeBSD 9 does alleviate the problem. By unsetting login.conf to defaults, a file can be created, saved and re-opened, but it will not display the characters correctly, it will look l= ike: ;\xf0;; instead of ;=C3=B0;; Setting LANG will again break Nvi with the message: Conversion error on line 1; FILE: unmodified: line 1 I've described the problem to Sven Verdoolaege also. Currently being very careful, or installing Nvi 1.79 from FreeBSD 9.3 source tree. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-203040-8>