bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNU sed version 4.2.1: on OS X, C locale gets aliased to UTF-8


From: Paul Eggert
Subject: Re: GNU sed version 4.2.1: on OS X, C locale gets aliased to UTF-8
Date: Thu, 06 Sep 2012 11:39:39 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0

On 09/06/2012 11:03 AM, Max Horn wrote:

> I proposed the exact same patch you proposed back in January.

Ah, sorry, I was confused.  Again.  Ouch.

Please let me try to summarize the situation to make sure that I
understand it.  We're talking about two different patches, either of
which you say will solve the problem.  The January patch is:

--- a/lib/localcharset.c
+++ b/lib/localcharset.c
@@ -262,6 +262,7 @@ get_charset_aliases (void)
            "ISO8859-9" "\0" "ISO-8859-9" "\0"
            "ISO8859-13" "\0" "ISO-8859-13" "\0"
            "ISO8859-15" "\0" "ISO-8859-15" "\0"
+           "US-ASCII" "\0" "ASCII" "\0"
            "KOI8-R" "\0" "KOI8-R" "\0"
            "KOI8-U" "\0" "KOI8-U" "\0"
            "CP866" "\0" "CP866" "\0"

and the July patch is:

--- a/lib/localcharset.c
+++ b/lib/localcharset.c
@@ -542,5 +542,12 @@ locale_charset (void)
  if (codeset[0] == '\0')
    codeset = "ASCII";

+#ifdef DARWIN7
+  /* MacOS 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;
}

If I understand things correctly, you're saying the January patch is
more logical, but that either will work, and so you'd settle for
either.

Bruno has objected to the January patch, but has not commented on the
July patch.  You've responded to Bruno's January objections, and he
hasn't had time to follow up.

> I (and everybody who has installed GNU sed via Fink) has been using
> the proposed fix for months, and I can assure you that i18n is
> working fine.

Thanks for mentioning that.  By "the proposed fix" I assume you mean
the January patch.

I'd greatly appreciate Bruno's comments, if he has the time.  If not,
I'm thinking of pushing the July patch, as a temporary fix until Bruno
does find the time, since he hasn't objected.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]