bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with get_wch() and wide characters


From: Kim Tore Jensen
Subject: Re: Problems with get_wch() and wide characters
Date: Sun, 28 Dec 2008 10:49:25 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

Hello Thomas,

Yes, I tried the setlocale function.

The result was that WACS_* characters stopped working - that is, when
using the line_set functions, they only drew whitespace instead of
borders.

Regarding your second email, system locales are set to:

$ export|egrep "(LOCALE|LANG|LC_ALL)"
declare -x LANG="en_US.utf8"
declare -x XTERM_LOCALE="en_US.utf8"

However, I tried changing these and setting it with
        setlocale(LC_ALL, "nb_NO.utf8");
        setlocale(LC_ALL, "en_US.utf8");
        setlocale(LC_ALL, "");

Ncurses seems to be an Arch build of 5.7:

$ ncursesw5-config --version
5.7.20081102


Best regards,
Kim Tore Jensen


On Thu, Dec 25, 2008 at 07:01:10AM -0500, Thomas Dickey wrote:
> On Wed, 24 Dec 2008, Kim Tore Jensen wrote:
>
>> Hello,
>>
>> I am attempting to get a wide character using the get_wch function:
>>
>> {
>>      int chartype;
>>      wint_t ch;
>>      chartype = get_wch(&ch);
>> }
>>
>> When typing ASCII characters as 'a', 'b', 'c' etc., they are returned
>> with chartype = 0 and ch = 'a', 'b', 'c' etc.
>>
>> However, when typing non-ASCII characters as the Norwegian letters
>> '�', '�', '�', they are not recognized. get_wch() returns only ERR and
>> sets ch to 0.
>>
>> I use raw() and keypad(), and my LANG is exported to "nb_NO.utf8".
>> System locales in general work well and my shell interprets these
>> characters OK.
>
> did your program do
>       setlocale(LC_ALL, "");
>
> ?
>
> -- 
> Thomas E. Dickey
> http://invisible-island.net
> ftp://invisible-island.net

Attachment: pgpw9APhgAzl4.pgp
Description: PGP signature


reply via email to

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