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]

Re: binutils + i18n


> 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.


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