GCC's Unicode use [was Re: Compile performance of Linux kernels in mainline gcc]
Joseph S. Myers
joseph@codesourcery.com
Sat Oct 30 21:07:00 GMT 2004
On Sat, 30 Oct 2004, Paul Schlie wrote:
> Maybe GCC's generation of Unicode friendly quoted message text should be
> explicitly requested as a command line option; thereby eliminating any
> potential confusion over expectations by either the user, and/or non-Unicode
> friendly programs which may subsequently parse GCC's output for whatever
> purpose?
Any programs parsing GCC's output need to set LC_ALL=C if they care at all
about the text of error messages; this is nothing new as there have been
translated messages for a long time. If they only care for the message
format "source-file:line: message" (a GNU standard, not GCC-specific) then
they just need to expect messages in the locale character set - and
translated messages again mean this has been the case for a long time.
There was a time when many programs adding Unicode support had their own
special command-line options to enable it. This was a mistake; it made
things excessively difficult if you just want a working Unicode
environment without fiddling with every program's configuration. Setting
environment variables such as LANG, LC_CTYPE and LC_ALL is the established
way of controlling these things for all programs, not just GCC; and unlike
five years ago, this works generally for most programs on a GNU/Linux
system, with only a small proportion that don't yet work with Unicode.
--
Joseph S. Myers http://www.srcf.ucam.org/~jsm28/gcc/
jsm@polyomino.org.uk (personal mail)
joseph@codesourcery.com (CodeSourcery mail)
jsm28@gcc.gnu.org (Bugzilla assignments and CCs)
More information about the Gcc
mailing list