|
From: | Alexander E. Patrakov |
Subject: | Re: [PATCH]console:UTF-8 mode compatibility fixes |
Date: | Sun, 19 Feb 2006 09:33:37 +0500 |
User-agent: | Debian Thunderbird 1.0.2 (X11/20051002) |
Thomas Dickey wrote:
On Sat, 18 Feb 2006, Alexander E. Patrakov wrote:If ncurses attempt to add some Chinese character to the Linux text screen, Linux (correctly) prints this replacement character and advances the cursor by one position. Ncurses think that the cursor has moved two positions forward. The effect is that when you view the testcase in Lynx (compiled --with-screen=ncursesw) on Linux console and press PageDown, the fourth line contains "Thek" instead of "The" in the end. This disagreement has to be solved somehow.yes. ncurses has no better information for this than the result from wcwidth(). Shall we add another kludge to accommodate Linux console?
Maybe yes, since putting wcwidth() into the kernel is a bigger kludge, because linux kernel will never draw CJK, and because after glibc update, kernel and glibc might disagree upon wcwidth of some characters.
So on linux console, ncurses should draw two 0xfffd characters when a character with wcwidth > 1 is requested.
(Are there other terminal emulators with this specific problem?)
Not sure. I will test putty a bit later. Anyway, an environment variable for this kludge may be a good idea.
-- Alexander E. Patrakov
[Prev in Thread] | Current Thread | [Next in Thread] |