This is the mail archive of the
mailing list for the GCC project.
Re: UTF-8 quotation marks in diagnostics
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Martin Sebor <msebor at gmail dot com>
- Cc: "D. Hugh Redelmeier" <hugh at mimosa dot com>, <gcc at gcc dot gnu dot org>
- Date: Thu, 22 Oct 2015 20:16:18 +0000
- 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 Thu, 22 Oct 2015, Joseph Myers wrote:
> multibyte characters in that output). (If an explicit character set is
> specified for LC_MESSAGES that's different from that in LC_CTYPE, you
> probably have a broken environment - multibyte characters need to have a
The specific wording in POSIX that justifies this is: "If different
character sets are used by the locale categories, the results achieved by
an application utilizing these categories are undefined.".
So using nl_langinfo (CODESET) (and thereby LC_CTYPE) to determine output
encoding is fully POSIX-conforming, and while there are several ways in
which a "c99" wrapper needs to adjust for differences between the "gcc"
driver interface and the POSIX "c99" interface, this is not one of them.
Joseph S. Myers