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: LC_MESSAGES problem ?


> Date: Tue, 21 Nov 2000 02:32:09 +0900
> From: Won-kyu Park <wkpark@chem.skku.ac.kr>

>    setlocale(LC_CTYPE,"C");
>    setlocale(LC_MESSAGES,"");

Code like that has never been portable.  POSIX says that if different
locale categories use different character sets or codesets, the result
is undefined.

Most GNU applications use setlocale (LC_ALL, "") or avoid setlocale
entirely.  For these applications the problem should arise only if the
user specifies incompatible locale categories in the environment, but
in general glibc can't fix screwups like that, and I don't think it
should try.

> There are many programs using setlocale(LC_MESSAES,"") only.
> (the gcc also)

Ah yes, GCC.  GCC 2.95.2 has that problem if you configure it with the
non-default --enable-nls option.  Sorry about that.  I introduced the
problem when I added the NLS option to GCC.

GCC ought to get fixed.  That was on my to-do list a while ago, but I
ran out of time to fix it (sorry, I have only so much volunteer time).
In the meantime, to work around the problem, don't specify
--enable-nls when configuring GCC.

Are there any applications other than GCC?

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