Re: Bug 24179



On Fri, Jun 14, 2002 at 04:45:47PM +0200, Pablo Saratxaga wrote:
> 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.

I was thinking of having strings that contained characters beyound
ascii, but only ascii in the keywords. Then the C, POSIX or i18n locale
would be better.

Best regards
Keld



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