develooper Front page | perl.perl5.porters | Postings from March 2008

"646"

Thread Next
From:
Jarkko Hietaniemi
Date:
March 12, 2008 18:44
Subject:
"646"
Message ID:
47D886D9.6060001@iki.fi
This fix for Encode::Alias should make Solaris happy:

--- ext/Encode/lib/Encode/Alias.pm.dist to maalis 13 03:23:09 2008
+++ ext/Encode/lib/Encode/Alias.pm      to maalis 13 03:23:25 2008
@@ -150,7 +150,7 @@
     # ASCII
     define_alias( qr/^(?:US-?)ascii$/i       => '"ascii"' );
     define_alias( 'C'                        => 'ascii' );
-    define_alias( qr/\bISO[-_]?646[-_]?US$/i => '"ascii"' );
+    define_alias( qr/\b(?:ISO[-_]?)?646(?:[-_]?US)?$/i => '"ascii"' );

     # Allow variants of iso-8859-1 etc.
     define_alias( qr/\biso[-_]?(\d+)[-_](\d+)$/i => '"iso-$1-$2"' );

The thing is that langinfo(CODESET) which is the first thing
encoding::_get_locale_encoding() tries, returns "646" in Solaris.
Apparently Solaris recently changed this.

No, the 646 is not 20 houses down from the the beast, it's the ASCII.

Yes, the _get_locale_encoding() could and probably should be made
a public API, dropping that leading underbar.

I don't know what's going on with HP-UX and 'roman8', sorry, Merijn.






Thread Next


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