Bug#531372: vim-gtk: misuses X cut buffer

Jonathan Nieder jrnieder at gmail.com
Mon Jun 1 04:10:21 UTC 2009


Package: vim-gtk
Version: 2:7.2.148-2
Severity: minor

1. Open gvim and type some non-ASCII text such as "étale".
2. Yank it (with just "yy", into the default register).
3. Exit.
4. Paste into a uxterm.

xterm treats the text as Latin-1, and the word étale appears. Similarly:

1. Open uxterm, type some non-ASCII text such as "étale".
2. Select it with the mouse.
3. Unselect it.
4. Paste into gvim (with shift-insert or button-2).

gvim treats the text as malformed UTF-8, and the text <e9>tale is
inserted. On the other hand, text can be pasted from gvim to gvim
without problems.

This puzzled me (which program is right?) until I read the xterm
manpage, which informs me

	But cut-buffers handle only ISO-8859-1 data (officially - some
	clients ignore the rules).

That is indeed how xterm treats the cut buffer:

1. Open uxterm, type some non-Latin-1 text such as “quoted”.
2. Select it with the mouse.
3. Unselect it.
4. Paste into xterm.

xterm lets the text degrade to Latin-1, in this case "quoted".

:help x11-cut-buffer suggests that vim uses the cut buffer mostly for
xterm's benefit. Maybe gvim should imitate xterm here?

Regards,
Jonathan Nieder





More information about the pkg-vim-maintainers mailing list