This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: LC_MESSAGES problem ?
- To: pthomas at suse dot de
- Subject: Re: LC_MESSAGES problem ?
- From: Paul Eggert <eggert at twinsun dot com>
- Date: Sat, 25 Nov 2000 18:14:34 -0800 (PST)
- CC: gcc-bugs at gcc dot gnu dot org
- References: <20001120175546.A15984@zinc.skku.ac.kr> <m38zqf2eyy.fsf@otr.mynet.cygnus.com> <20001121014722.A4539@zinc.skku.ac.kr> <m31yw61t2d.fsf@otr.mynet.cygnus.com> <20001121023209.A4560@zinc.skku.ac.kr> <200011201800.KAA01708@ruby.twinsun.com> <20001125194042.A11897@Jeffreys.suse.de>
> Date: Sat, 25 Nov 2000 19:40:42 +0100
> From: Philipp Thomas <pthomas@suse.de>
> --enable-nls now *is* the default for anything other then canadian cross.
The NLS support was premature when I contributed it, which is why
--enable-nls was not the default. Apparently the NLS support is still
premature. (I haven't looked at it for a while.)
> So
>
> #ifdef HAVE_LC_MESSAGES
> setlocale (LC_MESSAGES, "");
> #endif
>
> should be changed to unconditionally use setlocale (LC_ALL, "")?
Yes, that is the only portable thing to do.
My goal was to fix GCC so that it would still work if you replace the
above with setlocale (LC_ALL, ""). I didn't have time to do that, though.
> this would require carefull review of the GCC code to see that
> nothing breaks because of changing collation rules etc.
Yes, of course. The review shouldn't be that hard, but it will be a
bit tedious. You have to rip out most uses of <ctype.h> macros, for
example. This is the only realistic way to fix GCC.
> But as GCC does seem to need a fix, I can do it easily as I now maintain the
> i18n specific parts of gcc.
Yes, please fix it as described above. The current code is broken.
> JFI, at least for the CVS versions of gcc you nowadays have to specify
> --disable-nls to not use it.
I would make --disable-nls the default until after GCC is fixed as
described above. The current behavior is definitely broken for some
locales.