This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: case conversion with Turkish locale


Hi Ulrich,


On Sat, 23 Oct 2004 01:53:30 -0700, Ulrich Drepper <drepper@redhat.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> ismail dönmez wrote:
> > Well imho there should a locale safe version of conversions functions
> > so that I dont have to do export LC_ALL=POSIX before running programs
> > that choke on Turkish locales.
> 
> What "conversions functions"?
> 
> If you mean tolower or strcasecmp, just use
> 
>   locale_t c_loc = newlocale (LC_ALL_MASK, "C", NULL);
> 
>   lower = tolower_l (upper, c_loc);
> 
> and similar code for other functions.  You have to call newlocale() only
> once in the entire program run.

I was using setenv workarounds.... Thanks for info.

> 
> But this cannot solve the fundamental problem that the often made
> assumption, that the value of tolower/toupper of a byte is another byte,
> is wrong in some locales.  This can only be solved by rewriting code.
> And the fact seems to be that those affected by the problems have to
> come up with (clean) patches to fix them.
> 

If you tell me what functions/files needs rewriting/fixing I will be
happy to have a look as these problems ruin my Linux usage.

Regards,
ismail

-- 
Time is what you make of it


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]