On 03/16/2012 08:40 AM, Jim Meyering wrote:
> We want to release coreutils-8.16 soon, so here's a snapshot.
> I'll let the NEWS and git shortlog details say the rest,
> other than "Thanks!" to all who are helping.
>
> coreutils snapshot:
> http://meyering.net/cu/coreutils-ss.tar.xz 4.8 MB
> http://meyering.net/cu/coreutils-ss.tar.xz.sig
> http://meyering.net/cu/coreutils-8.15.74-be17e3.tar.xz
Lots of tests were failing on this loan machine:
$ system_profiler SPSoftwareDataType
Software:
System Software Overview:
System Version: Mac OS X 10.6.8 (10K549)
Kernel Version: Darwin 10.8.0
Boot Volume: Macintosh HD
Boot Mode: Normal
Computer Name: --------------
User Name: ------------------
Secure Virtual Memory: Not Enabled
64-bit Kernel and Extensions: No
Time since boot: 22 days 16:41
This was due to quotes being generated as the fancy curly variety,
which in turn was due to locale_charset() returning "UTF-8",
which in turn was due to nl_langinfo() returning "US-ASCII".
This happens for "C" or any unknown charset?
The proposed gnulib patch avoids the issue for me.
cheers,
Pádraig
>From 41f873206b2e576e36337cee84541df9bdbe7638 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <[email protected]>
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 <[email protected]>
+
+ 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 <[email protected]>
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