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 17, 2014 16:59
Subject:
Re: new locale warnings (Re: [perl.git] branch blead, updated. v5.21.5-435-gbd083ee)
Message ID:
CA+vYcVwbFv4=JWAwuf919Cg2Ump+mXESr1m-enC2kvX9fOt7cw@mail.gmail.com
On Sun, Nov 16, 2014 at 11:27 PM, Karl Williamson
<public@khwilliamson.com> wrote:

> This is strange.  Try this one liner and see if you get the warning.
>
> perl -Ilib -MPOSIX -le 'use locale; print setlocale(LC_ALL, "C")'
>
> I can't fathom how you wouldn't get it, based on the output you sent below,
> But I can't fathom how it's not showing up in the test suite either, as I
> think the C locale is used in many places, nor can I see why MS would be
> doing this.  It would mean another violation of the POSIX standard, and in a
> recent version of their software to boot.  T think dromedary is using VS
> 2010.

The C locale doesn't warn but when other locales do warn they
sometimes say that the problem is with the C locale rather than the
one actually being used.  It's like there's something sticky about the
first warning that causes every subsequent warning to complain about
'C':

.\perl -Ilib -MPOSIX -le "use locale; for $l (@ARGV) {print
setlocale(LC_ALL, $l);}" C Japanese_Japan.932 zh ja ko C
C
Locale 'Japanese_Japan.932' may not work well.  Some characters in it
are not recognized by Perl.
Japanese_Japan.932
Locale 'C' may not work well.  Some characters in it are not recognized by Perl.
zh
Locale 'C' may not work well.  Some characters in it are not recognized by Perl.
ja
Locale 'C' may not work well.  Some characters in it are not recognized by Perl.
ko
C



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