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: Max Horn
Subject: Re: GNU sed version 4.2.1: on OS X, C locale gets aliased to UTF-8
Date: Wed, 6 Jun 2012 17:30:54 +0200

Dear Paul,

thank you for considering resolving this issue!

Am 06.06.2012 um 16:53 schrieb Paul Eggert:

> How about the following patch instead?  Does it solve the problem?

Yes, that also solves the problem (I just tested it).


BTW, a very off-topic, very low importance remark: In your patch, and also 
throughout the sed / gnulib sources, the name "Mac OS X" is misspelled as 
"MacOS X" (alternatively, "OS X" would also be a valid spelling). Yes, this is 
nitpicking, but then I'd also say this to others if they were to write "Free 
BSD" or "GNUsed" ;-)

Cheers,
Max


> I'd also like Bruno's opinion on this of course.
> 
> --- 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;
> }
> 
> 




reply via email to

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