[Bug 196447] vi(1) misbehavior when encountered invalid Unicode character

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Jan 5 21:51:43 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196447

--- Comment #4 from lichray at gmail.com ---
(In reply to Xin LI from comment #3)

It's not quite "data corruption", since an error will be shown, and your data
is not immediately lost: just switch to the correct encoding (at runtime, after
the error is shown) with ":se fe=iso-8859-1" and write again then your data is
back.

Reload the file, like, as if ":e"?  Sounds interesting.  Added to the github
issue.  But I need to implement the raw-write first, otherwise the data is
really lost.  The change itself does not solve the problem.  For example, when
you open a slightly larger file, and the conversion error is close to the end
of the file, then during your editing no error is shown (the conversion is only
needed when the line is needed); the error only happens when writing.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list