[lokisetup] localization?

Ludwig Nussel ludwig.nussel at suse.de
Thu Jun 8 03:37:44 EDT 2006

On Thursday 08 June 2006 03:30, Ryan C. Gordon wrote:
> > I don't think you should abuse the 'lang' xml attribute for the encoding. Just
> > introduce an 'encoding' attribute for that purpose. For backward compatability
> > you can use g_utf8_validate() to check whether a text is valid utf8 and assume
> > iso8859-1 if not. g_convert() can recode the string in this case.
> The encoding is in the LANG variable that the system supplies to 
> loki_setup. I'm open to anything, but I don't have the mental capacity 
> to make a better patch right now. Crunch time really sucks.  :/

Your patch looks to me like you want to support multiple files with
different encodings so you can specify something like <readme
lang="fr.utf8"> and <readme lang="fr"> in setup.xml. For that
purpose one <readme lang="fr" encoding="iso8859-1"> would be more

GTK2 however never accepts a legacy encoding anyways. The widget
that displays the text always wants an UTF-8 string. So if you
mainly care about the GTK2 UI just encode the file as UTF-8. The
gtk1 and ncurses UIs will display garbage when run in a legacy
environment then though (is there any distro that did not switch to
UTF8 by default yet anyways?).

I just noticed that the GTK2 UI doesn't display some labels when run
with LANG=de_DE.UTF-8, it complains non-UTF8 strings.


 (o_   Ludwig Nussel
 //\   SUSE LINUX Products GmbH, Development
 V_/_  http://www.suse.de/

More information about the Lokisetup mailing list