in reply to Encoding is a pain.
You seem to have two major problems. One of them is a perl problem, one is not.
The perl problem first: encoding doesn't specify anything about what I/O encoding the script should use. It only specifies what encoding the script itself is in. Err... I was wrong here. encoding does set the encodings of STDIN and STDOUT, but as it says: "Note that STDERR WILL NOT be changed." (under USAGE). I assume the debugging output of XML::Parser goes to STDERR.
Your second problem is, as you've diagnosed, that Shift_JIS is under-specified, and possibly mis-specified as well. So, why is it that your terminal uses Shift_JIS and not utf8?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Encoding is a pain.
by zeimusu (Sexton) on Sep 21, 2004 at 15:22 UTC |