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

RFC: ? Add a warning when matching locale against utf8

From:
karl williamson
Date:
November 27, 2010 11:49
Subject:
RFC: ? Add a warning when matching locale against utf8
Message ID:
4CF160CA.70409@khwilliamson.com
We warn people in the pods that it is not a good idea to mix locale and 
utf8.  I propose adding a warning message when it does happen.

What actually goes on in this circumstance is that the actual locale is 
ignored.  If that locale is not ISO 8859-1, then your results are likely 
to be garbage to whatever extent the locale differs from 8859-1.  The 
'A' in your locale may, for example, not be Unicode's 'A'.

Since 8859-1 is a subset of Unicode, that locale will result in 
non-garbage, but you may get unexpected results with characters matching 
outside the locale.



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