I use perl on redhat 9, and I now think that auto-translated input is the dumbest idea ever!!!!
I have a problem here with Perl v5.8.0 on Red Hat 9. Simplified, my script looks like this:
while (<>) { s/Ä/cx/g; print; }
This works with older versions of Perl, and it works in the C locale, but it doesn't work here in a UTF-8 locale. I tried putting stuff like "use bytes" or "no utf8" or "no locale", but it didn't help.
Can anyone suggest a good solution, ideally one that is portable
between different locales and different versions of Perl?
Things would be infinitely simpler if perl defaulted to pure binary i/o, imo.
Anyway, Ive had strange problems with perl in UTF-8 locales, and this is what I had to do:
binmode STDOUT, ":utf8" ;
binmode STDIN, ":utf8";
Regexps and things work, but invalid utf-8 sequences might still trip it up.
-- Linux-UTF8: i18n of Linux on all levels Archive: http://mail.nl.linux.org/linux-utf8/
