[erlang-questions] UTF8

Hasan Veldstra <>
Thu Feb 14 10:43:09 CET 2008


> Yeah, that worked thanks!  I had tried what you did, but it did not  
> work with the UTF-32 data.  Do you know why?

As Alex said, you can only have bytes (0-255) in your binaries.

> 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?

I don't know. As far as Erlang is concerned, it's all just numbers,  
and so no conversions are done. Maybe a library you're using did it  
for you somewhere, or the document is actually in UTF-32, despite  
what the headers say.



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



More information about the erlang-questions mailing list