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

RFC: refuse to change into an unsupported locale

Thread Next
From:
Karl Williamson
Date:
April 23, 2016 22:42
Subject:
RFC: refuse to change into an unsupported locale
Message ID:
571BFA32.3070507@khwilliamson.com
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 
them.

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

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