From: Michael J Gruber <git@drmicha.warpmail.net>
To: Yann Droneaud <yann@droneaud.fr>
Cc: git <git@vger.kernel.org>
Subject: Re: [PATCH] t9129: fix UTF-8 locale detection
Date: Tue, 25 May 2010 09:33:52 +0200 [thread overview]
Message-ID: <4BFB7D60.6090602@drmicha.warpmail.net> (raw)
In-Reply-To: <1274720888.4838.13.camel@localhost>
Yann Droneaud venit, vidit, dixit 24.05.2010 19:08:
> Le mardi 18 mai 2010 à 19:08 +0200, Yann Droneaud a écrit :
>> Le mardi 18 mai 2010 à 18:05 +0200, Michael J Gruber a écrit :
>>> Yann Droneaud venit, vidit, dixit 18.05.2010 16:41:
>>>> Since I don't have en_US.utf8, some tests failed:
>>
>>>>
>>>> On my system locale -a reports:
>>>>
>>>> en_US
>>>> en_US.ISO-8859-1
>>>> en_US.UTF-8
>>>>
>>>
>>> locale -a|grep en_US
>>> en_US
>>> en_US.iso88591
>>> en_US.iso885915
>>> en_US.utf8
>>>
>>> This is on Fedora 13, which is not exactly exotic. What is your system?
>>>
>>
>
> I've checked carefully multiple system and configuration, and found why
> we have some little locale problem here.
>
> Since glibc 2.3, a file can hold all locales in file "locale-archive"
> instead of having a tons of directory. To store all the locales in this
> file, it uses an index based on a "normalized" codeset, e.g. it converts
> codeset to lowercase, removes dash and minus.
> So when one ask for the locale list, locale first go through the
> "locale-archive" content and report normalized codeset (utf8) instead
> of canonical codeset (UTF-8), then it proceed with the legacy locales
> directories, using for them the canonical codeset.
>
> Until recently, Mandriva Linux doesn't make use of "locale-archive", so
> UTF-8 locales were reported. Version in development uses
> "locale-archive" + legacy locale directories, hence the mix I've
> reported. Other Linux distributions like Fedora and Ubuntu uses only
> "locale-archive" and so, have only "normalized" codeset.
> POSIX doesn't specify the output of locale -a, so it's not really a bug
> to show "normalized" codeset name.
>
> But all others "POSIX" system I've found report "canonical" codeset,
> e.g. UTF-8 (all but latest cygwin).
>
> Here's the bug report:
> http://sourceware.org/bugzilla/show_bug.cgi?id=11629
Thanks a lot for doing the leg work! Is there any way to, say,
set_local(a) and check whether get_locale() == a up to equivalence?
>
> BTW, I will shortly provided a fix for the testcase, which will handle
> all cases.
>
> Regards.
>
Thanks,
Michael
next prev parent reply other threads:[~2010-05-25 7:34 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-18 14:41 [PATCH] t9129: fix UTF-8 locale detection Yann Droneaud
2010-05-18 16:05 ` Michael J Gruber
2010-05-18 17:08 ` Yann Droneaud
2010-05-18 17:16 ` Yann Droneaud
2010-05-18 17:45 ` Linus Torvalds
2010-05-18 19:58 ` Andreas Schwab
2010-05-18 20:00 ` Linus Torvalds
2010-05-18 20:49 ` Yann Droneaud
2010-05-19 15:16 ` Yann Droneaud
2010-06-02 19:14 ` Re* " Junio C Hamano
2010-05-24 17:08 ` Yann Droneaud
2010-05-25 7:33 ` Michael J Gruber [this message]
2011-01-06 14:22 ` [PATCH/RFC 0/4] en_US.UTF-8 " Yann Droneaud
2011-01-06 14:22 ` [PATCH 1/4] test: add a library to detect an en_US.UTF-8 locale Yann Droneaud
2011-01-07 18:37 ` Junio C Hamano
2011-01-06 14:22 ` [PATCH 2/4] test-lib.sh: add test_utf8() function Yann Droneaud
2011-01-07 18:45 ` Junio C Hamano
2011-01-06 14:22 ` [PATCH 3/4] test: use test_utf8 and GIT_LC_UTF8 where an en_US.UTF-8 locale is required Yann Droneaud
2011-01-07 18:48 ` Junio C Hamano
2011-01-06 14:22 ` [PATCH 4/4] t9129: use "$PERL_PATH" instead of "perl" Yann Droneaud
2011-01-07 18:49 ` Junio C Hamano
2010-05-18 20:37 ` [PATCH] t9129: fix UTF-8 locale detection Yann Droneaud
2010-05-19 2:44 ` Miles Bader
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BFB7D60.6090602@drmicha.warpmail.net \
--to=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=yann@droneaud.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.