bug-ncurses
[Top][All Lists]
Advanced

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

Re: ncursesw + non-utf8 locales


From: Dennis Preiser
Subject: Re: ncursesw + non-utf8 locales
Date: Sat, 22 Oct 2011 19:26:45 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Sat, Oct 22, 2011 at 12:15:00PM +0200, Felix Natter wrote:
> Dennis Preiser <address@hidden> writes:
> 
>> Felix Natter <address@hidden> wrote:
>>> I have attached a minimal example that includes the wideaddch() and
>>> widen() helper functions I wrote. If you choose a ISO-8859-1 locale for
>>> setlocale(), and switch gnome-terminal to Western (ISO-8859-15, which
>>> should be compatible), then you see only garbage on the screen.
>>> I guess this is to be expected when you try to output wchar_t (UTF-32?)
>>> to a 8bit console.
> 
> hi Dennis,
> 
>> I guess you see the byte by byte representation of the utf-8 string.
>>
>> UTF-8:       a   ä      a   ä      ß       °      α      λ
>> HEX:         61  c3 a4  61  c3 a4  c3 9f   c2 b0  ce b1  ce bb
>> ISO-8859-1:  a   Ã  €   a   Ã  €   Ã  APC  Â  °   Î  ±   Î  »
   ^^^^^^^^^^
Just for the record: This should be read as ISO-8859-15.

> Yes, that's exactly what I see, thanks for the detailed analysis!

Dennis



reply via email to

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