This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: UTF-8 quotation marks in diagnostics
- From: Martin Sebor <msebor at gmail dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: "D. Hugh Redelmeier" <hugh at mimosa dot com>, gcc at gcc dot gnu dot org
- Date: Thu, 22 Oct 2015 13:04:44 -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> <56283B7D dot 9020903 at gmail dot com> <alpine dot DEB dot 2 dot 10 dot 1510221629450 dot 8870 at digraph dot polyomino dot org dot uk>
On 10/22/2015 10:53 AM, Joseph Myers wrote:
On Wed, 21 Oct 2015, Martin Sebor wrote:
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.
LC_MESSAGES determines "the language and cultural conventions in which
messages should be written" (not necessarily the interpretation of
multibyte characters in that output).
Yes, but setting LC_CTYPE shouldn't affect the format, language,
or encoding of diagnostic messages, which is what the text quoted
from the GCC page recommends as a mechanism to change the quote
character in diagnostic messages.
If it did, it would mean that programmers would have to adjust
to the language of the source code of the program they're working
with. For example, if part of a program was written assuming,
say a German locale, then Japanese programmers would need to learn
German to understand the compiler output. (Otherwise, if they set
LC_CTYPE to their Japanese locale) the German quotes in the source
code could be interpreted as something else.
Martin