[lokisetup] localization?

Ludwig Nussel ludwig.nussel at suse.de
Wed Jun 7 07:16:08 EDT 2006


On Wednesday 07 June 2006 11:26, Ryan C. Gordon wrote:
> 
> > I swear there was a time, years ago, when LANG=fr worked, I guess that 
> > was before things like character encoding got more (less?) standardized.
> 
> (I'm making replying to myself into an olympic sport here, I swear...)
> 
> I have a pile of fixes to localization I've just committed, including 
> touching free()'d memory, etc...but they break the current fallback 
> mechanism for things like the "eula" tag's "lang" attribute, since I 
> didn't want "fr_CA.utf8" to fail to match "fr.utf8" ... the gtk2 UI flat 
> out refuses to show a Latin1 file if it thinks your locale is UTF-8, so 
> I have to specify the encoding, but don't want to specify every possible 
> territory in my setup.xml file. A better patch is welcome.

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.


cu
Ludwig

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




More information about the Lokisetup mailing list