From owner-freebsd-bugs@freebsd.org Fri Sep 11 12:45:10 2015 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0400DA019B1 for ; Fri, 11 Sep 2015 12:45:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC8F51B20 for ; Fri, 11 Sep 2015 12:45:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id t8BCj9qx002258 for ; Fri, 11 Sep 2015 12:45:09 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 203040] Nvi truncates files with non-ASCII characters Date: Fri, 11 Sep 2015 12:45:09 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 10.2-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: bjornr@iceland2000.com X-Bugzilla-Status: New X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Sep 2015 12:45:10 -0000 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.=