This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: binutils + i18n
- To: hjl at lucon dot org
- Subject: Re: binutils + i18n
- From: Paul Eggert <eggert at twinsun dot com>
- Date: Fri, 7 Sep 2001 13:22:16 -0700 (PDT)
- CC: libc-alpha at sourceware dot cygnus dot com, binutils at sourceware dot cygnus dot com
- References: <20010907130800.B24456@lucon.org>
> Date: Fri, 7 Sep 2001 13:08:00 -0700
> From: "H . J . Lu" <hjl@lucon.org>
>
> I got this question. I am not familiar with locale. Should I add
>
> setlocale (LC_CTYPE,"");
>
> to all
>
> setlocale (LC_MESSAGES, "");
The best solution to use is
setlocale (LC_ALL, "");
as is done in, say, fileutils.
Possibly this was not done in binutils, because binutils uses things
like 'isalpha' to detect whether a byte is an ASCII alphabetic
character, and binutils would misfunction if 'isalpha' succeeded on a
non-ASCII letter. This is a common problem.
If binutils does have this problem, you shouldn't use either setlocale
(LC_ALL, "") or setlocale (LC_CTYPE,"") until you fix binutils so that
binutils no longer assumes ASCII behavior for the ctype.h macros. I
would also remove the setlocale (LC_MESSAGES, "") until these fixes
are made, due to the problems noted by your correspondent.