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.".

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap07.html

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
jos...@codesourcery.com

Reply via email to