[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: is*() and locales
From: |
Andreas Jaeger |
Subject: |
Re: is*() and locales |
Date: |
18 Jan 2001 20:04:27 +0100 |
User-agent: |
Gnus/5.090001 (Oort Gnus v0.01) XEmacs/21.1 (Channel Islands) |
Guillaume Morin <address@hidden> writes:
> Here are my locale settings
>
> LANG, LANGUAGE, LC_* unset except
> LC_ALL=fr_FR
> LC_CTYPE=ISO-8859-15
> (as suggested by the French HOWTO)
>
> Running this program
>
> #include <stdio.h>
> #include <ctype.h>
>
> int main(void) {
> printf("%d %d\n",isprint('c'),isprint('é'));
> printf("%d %d\n",islower('c'),islower('é'));
> return 0;
> }
>
> I get :
>
> address@hidden ~/c/try$ ./uffu
> 16384 0
> 512 0
>
> However according to the is* and locale manpages, it seems that the
> is* functions should follow the locale. So 'é' should be considered
> as a printable and lowercase character, shouldn't it ?
> I've tried many other locale settings, I've been unable to find a
> configuration which makes the previous program "work".
>
> I use glibc 2.2.1 on a Debian GNU/Linux (unstable).
>
> Have I made a mistake or is this locale/glibc bug ?
You didn't initialize the locale environment, call setlocale (LC_ALL,
""); first.
Andreas
--
Andreas Jaeger
SuSE Labs address@hidden
private address@hidden
http://www.suse.de/~aj
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: is*() and locales,
Andreas Jaeger <=