in reply to Re^4: perl 5.14 regex: case insensitive match on international characters
in thread perl 5.14 regex: case insensitive match on international characters
When you open a filehandle, if you want to print non-ASCII characters to it, you must specify an encoding. STDOUT is a filehandle. Add something like this near the top of your script:
binmode(STDOUT, ":utf8");If you expect to read from STDIN, then you might want to call binmode on that too.
There's utf8::all which takes care of a lot of these gotchas.
If everyone used UTF-8 for everything, and assumed that everybody else did too, then life would be much easier.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: perl 5.14 regex: case insensitive match on international characters
by shamat (Acolyte) on Mar 19, 2012 at 15:44 UTC |