bug-ncurses
[Top][All Lists]
Advanced

[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 09:41:59 +0200
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

Thomas Dickey wrote:
> On Tue, 2 Jun 2009, Clemens Ladisch wrote:
>> The remaining problem is just that unctrl() returns a wrong string for
>> any characters that would be printable if interpreted as a wide
>> character.
>>
>> For example, in UTF-8, 0xff is not a valid character, but the Unicode
>> character U+00ff would be printable, so unctrl() returns "\377" instead
>> of the correct "~?".
> 
> I'll have to review that in detail (evening/weekend...).  However reading
> the patch, it seems that it does not take into account that an application
> must have initialized the locale before ncurses will stop using the legacy
> encoding.

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.

So whether an application has initialized the locale should not matter,
because the default ASCII encoding is a valid encoding like just any
other.


Best regards,
Clemens




reply via email to

[Prev in Thread] Current Thread [Next in Thread]