From: Tomas Frydrych (tomas@frydrych.uklinux.net)
Date: Fri Jan 24 2003 - 10:07:30 EST
Hi MG,
> the memory contents. As a side note, Tomas, please take a look (in the
> initializer).  I'm not sure why you used the redundant calls and I
> spent a long time analyzing the code, wondering if perhaps there is
> some rare corner-case that needed those.  If that's the case, I've my
> finger on the revert button.
Are you refering to the stuff that is now #if 0 and marked as 
absolete, and in particular the my_lst, etc stuff? If yes, this is what it 
is for:
The gtk1 kit does not support utf8. This means that if your locale is 
set for instance to cs_CZ.utf-8, AW analyses the native encoding as 
utf-8 and feeds the GUI strings encoded in utf-8. The GUI, however, 
expectes iso8859-2, and so the menus are malformed, with loads of 
x's and rubish where utf-8 uses more than 1 byte. In order to work 
around that we have to feed the GUI the strings in the 8-bit encoding 
it expects, not in utf8. To be able to do this, I added the  
getNative8BitEncodingName().
In order to determine the proper encoding to use in communicating 
with the GUI we have to do two passess in processing the langauge 
settings: (1) anlyse the locale information in the environment, and, if 
the encoding turns out to be utf-8, (2) temporarily remove the 
encoding from LANG (i.e., replace cs_CZ.utf-8 with cs_CZ) and 
analyse the locale information again to obtain the default encoding 
for cs_CZ. Now, because we changed LANG, we cannot reuse the 
old list, and have to call g_i18n_get_language_list again. So, those 
calls are not redundant.
Obviously, with gtk2 this problem does not exist, but this code is 
essential if the gtk1 version is to be usable with a utf-8 locale (which 
on Unix is the only way to get around the 256-character set 
limitation).
Tomas
This archive was generated by hypermail 2.1.4 : Fri Jan 24 2003 - 10:12:20 EST