[erlang-questions] UTF8

Hasan Veldstra <>
Thu Feb 14 11:42:38 CET 2008


> And how do you suppose my data was turned into UTF-32.  I got the  
> data originally from an HTTP GET request that returned a UTF-8  
> encoded XML file.  The file its self says it's UTF-8, and the  
> header tuple said the document was using the UTF-8 charset.  Does  
> Erlang convert the data automatically?

Actually, 332 (U+14C) is also the UTF-16 encoding for "Ō". If I  
remember correctly, the XML standard requires that the documents be  
in UTF-8 or UTF-16. So it's most likely that your XML file is encoded  
in UTF-16, and the headers are wrong.


--
http://12monkeys.co.uk
http://hypernumbers.com


More information about the erlang-questions mailing list