LC_MESSAGES problem ?
Paul Eggert
eggert@twinsun.com
Sat Nov 25 18:15:00 GMT 2000
> 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.
More information about the Gcc-bugs
mailing list