XML-Simple - Re: Non UTF8 decoding XML

Posted on Tue Oct 23 22:23:11 2007 by grantm in response to 6312 (See the whole thread of 7)
Re: Non UTF8 decoding XML

You're asking the wrong question. The right question to ask is why the original data you're trying to read isn't in Unicode already. And once you've fixed that by parsing the document why do you want to unfix it and convert it back to a legacy encoding? Is there some application that you're feeding the data to that doesn't understand Unicode?

ASCII, Latin-1, CP1252 and all the other legacy encodings each cater for a tiny subset of the characters supported by Unicode. This means that you can't combine data from source documents in different encodings, because a character that you read from one document might not be available in the encoding used by the other document. Whereas if you simply used Unicode you wouldn't need to worry.

Direct Responses: 6317 | Write a response