[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Character U+2028 can yield file corruption when edited in xterm



Control: reassign -1 xterm 325-1
Control: retitle -1 Character U+2028 can yield file corruption when edited in xterm

This seems to be an xterm bug since there is no such problem in
urxvt and mlterm, where U+2028 takes its own space. Moreover, I
get exactly the same problem with vi in xterm.

On 2016-06-22 12:48:46 +0200, Vincent Lefevre wrote:
> When editing a file where a line started by the U+2028 character,
> it got corrupted. Basically, what was stored is not what was
> displayed.

To reproduce the beginning of a corruption:

1. Type: printf "\u2028abcd\n" > file
2. Type: "emacs -Q -nw file" or "vi file"
3. Move the cursor several times to the right.

One gets successively:

abcd    (no cursor)
aacd    (cursor on the 2nd column)
aabd    (cursor on the 3rd column)
aabc    (cursor on the 4th column)
aabcd   (cursor on the 5th column)

Here this is just a display corruption, but when one edits the file,
this yields file corruption.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


Reply to: