Re: Bug 24179



Kaixo!

On Fri, Jun 14, 2002 at 04:34:07PM +0200, Keld Jørn Simonsen wrote:

> On Fri, Jun 14, 2002 at 03:33:49PM +0200, Pablo Saratxaga wrote:
> > > Due to the different capitalization rule, in the tr_TR locale, the
> > > locale_charset becomes (dotlessi)so-8859-9 instead of iso-8859-9.
> > 
> > g_strdown() CANNOT be used to lowercase strings supposed to be in ascii
> > and in locale independent encoding (like locale names, configuration
> > keywords (like "Name=", "Comment=" etc); for that, a different function
> > must be used that does NOT use the locale dependent upper/lower fucntions,
> > but instead use fixed, locale independent, ascii only, rules based solely
> > on the numeric values of the chars.
> 
> you should just use the C locale for parsing those configuration keywords.
> so swithch to C locale and parse and then switch back.

Better yet: using the g_ascii_strdown() function instead of g_strdown()

Switching locales may have bad consequences in case of multi-threading,
I suppose.

There are several g_ascii_*() functions, to use instead of the locale dependent
ones when the behaviour wanted is locale independent.


-- 
Ki ça vos våye bén,
Pablo Saratxaga

http://www.srtxg.easynet.be/		PGP Key available, key ID: 0x8F0E4975
[you can write me in Walloon, Spanish, French, English, Italian or Portuguese]



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