Front page | perl.perl5.porters |
Postings from April 2014
Re: [perl #121734]
Thread Previous
|
Thread Next
From:
Reini Urban
Date:
April 25, 2014 20:10
Subject:
Re: [perl #121734]
Message ID:
535AC12E.80501@cpanel.net
On 04/25/2014 03:02 PM, karl williamson via RT wrote:
> On 04/25/2014 01:33 PM, rurban@cpanel.net (via RT) wrote:
>> ./perl -MPOSIX -e'setlocale(LC_ALL, "ja_JP.utf8")'
>
> It works on my Linux; I notice that there is no -I parameter in your
> example. Are you sure you are getting the correct library path?
yes, sorry.
This fails only on cygwin, only tested on 32bit.
It fails with most eastern locales, but some eastern locales do pass.
I needed to this patch to pass the locale tests:
--- perl-5.18.2/lib/locale.t~ 2014-01-06 16:46:45.000000000 -0600
+++ perl-5.18.2/lib/locale.t 2014-04-25 14:28:31.455279000 -0500
@@ -528,7 +528,9 @@
sub trylocale {
my $locale = shift;
return if grep { $locale eq $_ } @Locale;
- return unless setlocale(LC_ALL, $locale);
+ # warn "# setlocale(LC_ALL, $locale)\n";
+ return if ($^O eq 'cygwin' and $locale =~
/^(ja_JP\.utf8|japanese\.sjis|ko_KR|korean|zh_)/) #RT 121734
+ or !setlocale(LC_ALL, $locale);
my $badutf8;
{
local $SIG{__WARN__} = sub {
--
Reini
Thread Previous
|
Thread Next