Larry Wall wrote on 2004-02-03 00:49 UTC:
> : What's the normal way to say "use the locale, like every other Unix
> : program that processes text"? Setting PERL_UNICODE seems to make it
> : *always* use Unicode:
>
> I believe "use open ':locale'" does that.
Does that only (as the name suggests) affect the "open" function?
There are more ways of strings finding their way into Perl than just
"open":
- How are the character set of @ARGV and %ENV handled?
- How about "opendir"?
- How about std{in,out,err}?
> Well, hey, I'm the one who agreed with you in the first place and asked
> that 5.8.0 be done that way, but apparently the current maintainers of
> Perl 5 got an excessive amount of grief from people whose production
> programs broke under RedHat.
Unfortunately, making all locales to use UTF-8 by default in Red Hat
Linux triggered among ASCII-only users a wide-spread "knee jerk"
reaction, that led to setlocale() being disabled in various places. That
did of course not help a bit to get us towards better UTF-8 support, but
was for some people a convenient hack to get ASCII-only applications to
work again.
Lesson learned: Never underestimate the power of the path of least
resistance!
A shame that Perl 5.8.0's quite sensible locale dependency was a victim
of that, too. Yes, several of my own Perl 5.0 scripts broke as well
(namely all those where I had implemented UTF-8 support myself), but in
all cases it was absolutely trivial to fix them, and by doing so they
became much simpler, in fact just as simple as Perl scripts operating on
ASCII are. Now we are back in a situation, where I have to add all sorts
of special instructions at the start to make Perl work properly under
UTF-8, with the result that far fewer developers will end up doing the
right thing.
Markus
--
Markus Kuhn, Computer Lab, Univ of Cambridge, GB
http://www.cl.cam.ac.uk/~mgk25/ | __oo_O..O_oo__
--
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/linux-utf8/