Mailinglist Archive: yast-devel (58 mails)

< Previous Next >
Re: [yast-devel] unicode strings in ncurses gui with libyui
  • From: Michael Andres <ma@xxxxxxx>
  • Date: Tue, 29 Jul 2008 21:14:19 +0200
  • Message-id: <20080729191419.GA18184@xxxxxxx>
On Tue, Jul 29, Klaus Kaempf wrote:

* Jan-Simon M?ler <dl9pf@xxxxxx> [Jul 29. 2008 13:39]:
Hi!

I wonder how i can get special characters "?? to be displayed in the
ncurses gui.
I use python-yui (libyui-bindings for python).
An example is attached.

The "?? works for QT UI, but not for ncurses.


This is going to be ugly ...

Doing a 'full debug' run, YNCurses reports the following:

<_M_> [ncurses] YNCursesUI.cc:59 YNCursesUI(): Start YNCursesUI
<_M_> [ncurses] YNCursesUI.cc:75 YNCursesUI(): setenv LC_CTYPE: C encoding:
ANSI_X3.4-1968
<_M_> [ncurses] NCstring.cc:325 setTerminalEncoding(): Terminal encoding SET
to: ANSI_X3.4-1968
<dbg> [ncurses] NCApplication.cc:56 setLanguage(): Language: de_DE.UTF-8
Encoding: ANSI_X3.4-1968

$LANG, $LC_CTYPE and $LC_ALL report "de_DE.UTF-8". Still, YNCurses
sets the encoding to "ANSI_X3.4-1968"


Well, the log says 'LC_CTYPE: C'


Don't get confused by 'setenv LC_CTYPE: C', ncurses retrieves the value by
calling

setlocale( LC_CTYPE, NULL );

and then explicitly sets $LC_CTYPE.


And the encodig is also based on LC_CTYPE via 'nl_langinfo(CODESET)'



I'd say your LC_CTYPE is C and not de_DE.UTF-8.

--

cu,
Michael Andres

+------------------------------------------------------------------+
Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4
+------------------------------------------------------------------+
Michael Andres YaST Development ma@xxxxxxxxxx
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)
Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0
+------------------------------------------------------------------+

--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups