From: Thomas Dickey <dickey@his.com>
To: "Alexander E. Patrakov" <patrakov@ums.usu.ru>
Cc: Adam Tla/lka <atlka@pg.gda.pl>,
torvalds@osdl.org, bug-ncurses@gnu.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH]console:UTF-8 mode compatibility fixes
Date: Sat, 18 Feb 2006 20:53:38 -0500 (EST) [thread overview]
Message-ID: <20060218204407.L36972@mail101.his.com> (raw)
In-Reply-To: <43F72C7A.8010709@ums.usu.ru>
On Sat, 18 Feb 2006, Alexander E. Patrakov wrote:
> [sorry for repost, the first attempt got blocked due to html attachment, now
> I gzipped it to circumvent the filter]
>
> Adam Tla/lka wrote:
>> This patch applies to 2.6.15.3 kernel sources to drivers/char/vt.c file.
>> It should work with other versions too.
>>
>> Changed console behaviour so in UTF-8 mode vt100 alternate character
>> sequences work as described in terminfo/termcap linux terminal definition.
>> Programs can use vt100 control seqences - smacs, rmacs and acsc characters
>> in UTF-8 mode in the same way as in normal mode so one definition is always
>> valid - current behaviour make these seqences not working in UTF-8 mode.
I expect some discussion from the people who _vehemently_ refused to allow
the Linux console to have anything that resembled a mode.
More to the point: since it's been in this form for several years, it
doesn't do much good to developers, because there are already workarounds
in ncurses to accommodate this, and even if you fixed it today, it would
be needed in ncurses for a few more years.
For example (man ncurses):
NCURSES_NO_UTF8_ACS
During initialization, the ncurses library checks for special
cases where VT100 line-drawing (and the corresponding alternate
character set capabilities) described in the terminfo are known to
be missing. Specifically, when running in a UTF-8 locale, the
Linux console emulator and the GNU screen program ignore these.
Ncurses checks the TERM environment variable for these. For other
special cases, you should set this environment variable. Doing
this tells ncurses to use Unicode values which correspond to the
VT100 line-drawing glyphs. That works for the special cases
cited, and is likely to work for terminal emulators.
When setting this variable, you should set it to a nonzero value.
Setting it to zero (or to a nonnumber) disables the special check
for Linux and screen.
is the most recent refinement (from a year ago) to a workaround which
first appeared in ncurses 5.4 (originally from December 2002).
> Doesn't work here with linux-2.6.16-rc3-mm1, ncurses-5.5. BTW has this
> been discussed with Thomas Dickey (ncurses maintainer)?
no (my seeing it via google doesn't count).
> Another feature request / bug report (spotted while viewing in Lynx a
> page containing English text and a few Chinese characters, artificial
> testcase attached):
>
> 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?
(Are there other terminal emulators with this specific problem?)
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
next prev parent reply other threads:[~2006-02-19 1:54 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-17 23:33 [PATCH]console:UTF-8 mode compatibility fixes Adam Tla/lka
2006-02-18 10:59 ` Andrew Morton
2006-02-18 16:01 ` Adam Tlałka
2006-02-19 4:24 ` Alexander E. Patrakov
2006-02-19 12:45 ` Adam Tla/lka
2006-02-19 16:16 ` Adam Tla/lka
2006-02-19 17:07 ` Alexander E. Patrakov
2006-02-18 14:17 ` Alexander E. Patrakov
2006-02-19 1:53 ` Thomas Dickey [this message]
2006-02-19 4:33 ` Alexander E. Patrakov
2006-02-19 11:47 ` Adam Tla/lka
2006-02-20 1:20 ` Thomas Dickey
2006-03-07 15:05 ` Adam Tlałka
2006-02-19 5:42 ` Alexander E. Patrakov
2006-02-19 10:15 ` Adam Tla/lka
2006-02-19 23:19 ` [PATCH]console:UTF-8 mode compatibility fixes - new version Adam Tla/lka
2006-02-20 8:14 ` [PATCH]console:UTF-8 mode compatibility fixes - new version #1 Adam Tla/lka
[not found] ` <43F72A1E.1090707@ums.usu.ru>
2006-02-18 14:37 ` [PATCH]console:UTF-8 mode compatibility fixes Adam Tlałka
2006-02-19 1:43 ` Thomas Dickey
2006-02-19 10:45 ` Adam Tla/lka
2006-02-18 22:35 ` Adam Tla/lka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060218204407.L36972@mail101.his.com \
--to=dickey@his.com \
--cc=atlka@pg.gda.pl \
--cc=bug-ncurses@gnu.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patrakov@ums.usu.ru \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox