>From 41f873206b2e576e36337cee84541df9bdbe7638 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Fri, 16 Mar 2012 10:43:54 +0000 Subject: [PATCH] localecharset: don't map US-ASCII to UTF-8 on Darwin * lib/localcharset.c (locale_charset): On Darwin 10.8 at least nl_langinfo returns "US-ASCII" for unknown and "C" charsets. Therefore return that directly, rather than mapping to "UTF-8". That was seen to cause issues with quotearg() etc. --- ChangeLog | 8 ++++++++ lib/localcharset.c | 1 + 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index e600a1d..61a1ef0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2012-03-16 Pádraig Brady + + localecharset: don't map US-ASCII to UTF-8 on Darwin + * lib/localcharset.c (locale_charset): On Darwin 10.8 at least + nl_langinfo returns "US-ASCII" for unknown and "C" charsets. + Therefore return that directly, rather than mapping to "UTF-8". + That was seen to cause issues with quotearg() etc. + 2012-03-15 Bruno Haible fmal: Avoid test failure on OpenBSD 5.1/SPARC64. diff --git a/lib/localcharset.c b/lib/localcharset.c index d41f346..be6646e 100644 --- a/lib/localcharset.c +++ b/lib/localcharset.c @@ -278,6 +278,7 @@ get_charset_aliases (void) "SJIS" "\0" "SHIFT_JIS" "\0" "ARMSCII-8" "\0" "ARMSCII-8" "\0" "PT154" "\0" "PT154" "\0" + "US-ASCII" "\0" "US-ASCII" "\0" /*"ISCII-DEV" "\0" "?" "\0"*/ "*" "\0" "UTF-8" "\0"; # endif -- 1.7.6.4