develooper Front page | perl.perl5.porters | Postings from November 2014

Re: new locale warnings (Re: [perl.git] branch blead,updated. v5.21.5-435-gbd083ee)

From:
Craig A. Berry
Date:
November 19, 2014 13:09
Subject:
Re: new locale warnings (Re: [perl.git] branch blead,updated. v5.21.5-435-gbd083ee)
Message ID:
65EC0DDF-6247-45A8-9A51-4E72C1A7C61D@mac.com

> On Nov 18, 2014, at 10:47 PM, Karl Williamson <public@khwilliamson.com> wrote:
> 
> On 11/18/2014 09:01 PM, Craig A. Berry wrote:
>> 
>>> On Nov 17, 2014, at 10:59 AM, Craig A. Berry <craig.a.berry@gmail.com> wrote:
>>> 

>> Same thing happens on OS X, where the warning is simply reporting the wrong locale:
>> 
>> $ ./perl -I../lib -MPOSIX -le 'use locale; for $l (@ARGV) {print setlocale(LC_ALL, $l);}' C zh_CN.GBK zh_TW.Big5 C
>> C
>> Locale 'C' may not work well.  Some characters in it are not recognized by Perl.
>> zh_CN.GBK
>> Locale 'C' may not work well.  Some characters in it are not recognized by Perl.
>> zh_TW.Big5
>> C
>> 
> 
> That gave me an idea, so I have a suspicion as to what is going on.  I'm hoping you will try the attached patch, and that it fixes the issue.
> 

That did the trick, thanks.  The above now looks like:

./perl -I../lib -MPOSIX -le 'use locale; for $l (@ARGV) {print setlocale(LC_ALL, $l);}' C zh_CN.GBK zh_TW.Big5 C
C
Locale 'zh_CN.GBK' may not work well.  Some characters in it are not recognized by Perl.
zh_CN.GBK
Locale 'zh_TW.Big5' may not work well.  Some characters in it are not recognized by Perl.
zh_TW.Big5
C

________________________________________
Craig A. Berry
mailto:craigberry@mac.com

"... getting out of a sonnet is much more
 difficult than getting in."
                 Brad Leithauser




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About