[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ncurses-5.7-20090530.patch.gz
From: |
Clemens Ladisch |
Subject: |
Re: ncurses-5.7-20090530.patch.gz |
Date: |
Wed, 03 Jun 2009 14:18:04 +0200 |
User-agent: |
Thunderbird 2.0.0.21 (Windows/20090302) |
Thomas Dickey wrote:
> On Wed, 3 Jun 2009, Clemens Ladisch wrote:
>> I don't quite understand your last sentence. As far as I understand
>> the curses specification, ncurses should _never_ stop using the legacy
>> encoding because any locale could use an encoding that has non-printable
>> characters above 127. For example, UTF-8 uses the bytes 128..253 for
>> multi-byte sequences, so none of these are printable.
>
> Not exactly. If the locale is unset, technically only POSIX (0-127) is
> recommended. However, since 1997 (before locale support on Linux was
> anything but vaporware), ncurses has interpreted that case as ISO-8859-1
> (hence "legacy").
So this is why unctrl() calls iswprint()?
> If the locale is set, ncurses follows that (or should - barring bug
> reports).
Well, this is the point of my bug report; unctrl() _always_ calls both
isprint() and iswprint(), so it uses the union of the printable
characters of both the current locale and of ISO 8859-1.
It should avoid calling iswprint() once another locale has been set, but
I don't see how this could be detected: the return value of setlocale()
is not portable, and ASCII and UTF-8 are indistinguishable as far as
isprint() is concerned.
Best regards,
Clemens
- Re: ncurses-5.7-20090530.patch.gz, Clemens Ladisch, 2009/06/02
- Re: ncurses-5.7-20090530.patch.gz, Thomas Dickey, 2009/06/02
- Re: ncurses-5.7-20090530.patch.gz, Clemens Ladisch, 2009/06/02
- Re: ncurses-5.7-20090530.patch.gz, Thomas Dickey, 2009/06/02
- Re: ncurses-5.7-20090530.patch.gz, Clemens Ladisch, 2009/06/03
- Re: ncurses-5.7-20090530.patch.gz, Thomas Dickey, 2009/06/03
- Re: ncurses-5.7-20090530.patch.gz,
Clemens Ladisch <=
- Re: ncurses-5.7-20090530.patch.gz, Thomas Dickey, 2009/06/03
- Re: ncurses-5.7-20090530.patch.gz, Clemens Ladisch, 2009/06/03
- Re: ncurses-5.7-20090530.patch.gz, Thomas Dickey, 2009/06/03
- Re: ncurses-5.7-20090530.patch.gz, Thomas Dickey, 2009/06/13