summaryrefslogtreecommitdiff
path: root/lib/localcharset.c
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-11-17 16:20:52 +0100
committerLudovic Courtès <ludo@gnu.org>2012-11-17 16:20:52 +0100
commit7ae4e75af5366086e60fbc2e9454dfd9e5965102 (patch)
tree61ea2340323e17e362de7860824917d3eeb66abd /lib/localcharset.c
parent44cd55752aad2a69e1583a2cb37c3b98c5c44ad3 (diff)
downloadguile-7ae4e75af5366086e60fbc2e9454dfd9e5965102.tar.gz
Update Gnulib to v0.0-7695-g26c0590.
* gnulib-local/m4/canonicalize.m4.diff: Remove. * Makefile.am (EXTRA_DIST): Adjust accordingly.
Diffstat (limited to 'lib/localcharset.c')
-rw-r--r--lib/localcharset.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/localcharset.c b/lib/localcharset.c
index ad28ec673..c4a0596be 100644
--- a/lib/localcharset.c
+++ b/lib/localcharset.c
@@ -542,6 +542,13 @@ locale_charset (void)
if (codeset[0] == '\0')
codeset = "ASCII";
+#ifdef DARWIN7
+ /* Mac OS X sets MB_CUR_MAX to 1 when LC_ALL=C, and "UTF-8"
+ (the default codeset) does not work when MB_CUR_MAX is 1. */
+ if (strcmp (codeset, "UTF-8") == 0 && MB_CUR_MAX <= 1)
+ codeset = "ASCII";
+#endif
+
return codeset;
}