This is the mail archive of the
mailing list for the GCC project.
Re: UTF-8 quotation marks in diagnostics
- From: Martin Sebor <msebor at gmail dot com>
- To: "D. Hugh Redelmeier" <hugh at mimosa dot com>, gcc at gcc dot gnu dot org
- Date: Wed, 21 Oct 2015 19:27:25 -0600
- Subject: Re: UTF-8 quotation marks in diagnostics
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LRH dot 2 dot 02 dot 1510211705080 dot 3681 at redclaw dot mimosa dot com>
On 10/21/2015 03:23 PM, D. Hugh Redelmeier wrote:
Several of us don't want UTF-8 quotation marks in diagnostics in our
environment (Jove subshells). We'd like a way to turn them off. We don't
think that they are a bad idea but they are bad in our environment.
English-language diagnostic messages will now use Unicode
quotation marks in UTF-8 locales. (Non-English messages
already used the quotes appropriate for the language in
previous releases.) If your terminal does not support UTF-8
but you are using a UTF-8 locale (such locales are the default
on many GNU/Linux systems) then you should set LC_CTYPE=C in
the environment to disable that locale. Programs that parse
diagnostics and expect plain ASCII English-language messages
should set LC_ALL=C. See Markus Kuhn's explanation of Unicode
quotation marks for more information.
This suggests that LC_CTYPE=C would do what we want: go back to ` and
' instead of 342\200\230 and \342\200\231.
That would go against the usual (i.e., POSIX) expected effect
of the environment variable. Specifically for GCC (or the c99
utility), POSIX requires LC_CTYPE to determine the locale used
to parse the input, and LC_MESSAGE to determine the locale of
diagnostic messages. If the c99 utility on your system doesn't
honor that I would recommend opening a bug.