in reply to XML::Parser Encoding (UTF-8 -> ISO-8859-1)
The trickery is all connected to the UTF8 flag, which is a bit flag attached to each string. For the data that XML::Parser returns, that UTF8 flag is set.
To get rid of this behaviour, clear the UTF8 flag. One way you can do it, is like this:
This way, the resulting string will be the same byte data as the original string, but with the UTF8 flag cleared. So now, the string should stay in ISO-Latin-1.sub de_utf8 { use bytes; return "$_[0]"; }
|
|---|