develooper Front page | perl.perl5.porters | Postings from April 2016

RFC: refuse to change into an unsupported locale

Thread Next
Karl Williamson
April 23, 2016 22:42
RFC: refuse to change into an unsupported locale
Message ID:
Perl supports most single-byte locales, plus UTF-8 locales.  It does not 
support any other multi-byte locales, such as are found for some East 
Asian languages.

On some platforms, just switching into some of these locales can cause 
perl to segfault (or rather it is a bug in the libc in failing to detect 
garbage input)

Since POSIX 2001, it has been possible to detect that locales are 
multi-byte.  And on platforms that support that, we could prohibit using 

I propose to do so, by having POSIX::setlocale() fail if perl detects 
that the locale is an unsupported one.

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About