This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: case conversion with Turkish locale
- From: ismail dönmez <ismail dot donmez at gmail dot com>
- To: Ulrich Drepper <drepper at redhat dot com>
- Cc: Baris Metin <baris at uludag dot org dot tr>, libc-alpha at sources dot redhat dot com
- Date: Sat, 23 Oct 2004 12:33:23 +0300
- Subject: Re: case conversion with Turkish locale
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=THaYzIRUFm9E+I45CSOIhUPoG8XBpyVIuOindSJxPm2X1vqurGTADE5ijdBHC0dTK+6SI73BmaQ2GE4OGmz3hsgCjoqkm2H9SnZN8VnDBXMYYF+wqeUM8S98AzCKVw5BNQMq5FmU/IS/fFZmMZrca321SYoWgCw+cvLe+MSY91o=
- References: <20041022134515.GA1064@uludag.org.tr> <200410222113.i9MLDcx0002691@magilla.sf.frob.com> <2a4f155d04102301327036e3b1@mail.gmail.com> <417A1C0A.9020908@redhat.com>
- Reply-to: ismail dönmez <ismail dot donmez at gmail dot com>
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