[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Character set tagging considered harmful
Thomas Wolff wrote:
> : ... Looking through the xterm code, I notice that it
> : stores each character of the screen in two bytes (excluding color and
> : attributes). This can't be the UTF-8 code, that would require three bytes.
> : Since Vim does screen handling like xterm, I might end up doing the same.
> But screen output (and display managament) is a write-only UTF-8
> application - you wouldn't want to get characters back out from the screen.
> Text handling in an editor is quite different.
Vim keeps a copy of the actual text on the screen. This is used to optimize
the output to the terminal (don't draw text that's already there). In the GUI
it's used for redrawing and for selecting text in non-Visual mode.
The copy of the screen could also be kept in UTF-8, but then it requires an
extra byte per screen character. I suppose that is why xterm uses two bytes
and translates to/from UTF-8.
--
hundred-and-one symptoms of being an internet addict:
140. You'd rather catch a score on the web than watch the game as
it is being played on tv.
--/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\--
\ \ www.vim.org/iccf www.moolenaar.net www.vim.org / /
-
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/lists/