[erlang-questions] kick start a newb!
Thu Feb 7 23:42:30 CET 2008
Looking at the URL you included in your post, I'd agree it probably is UTF-8
related. As Lev was alluding to in his response, in Erlang strings are just
a list of integers. At the top level, when you have a list of integers, if
all of them are printable ASCII characters, it will display them as a
string, hence [65,65,65] will be printed "AAA", whereas [1,2,3] will print
Not all of the bytes in a UTF-8 encoded string are necessarily printable
ASCII. So, it shows up as a list of integers. What you may want to do is
look at xmerl (http://erlang.org/doc/apps/xmerl/index.html) to parse the
XML. It will handle the character set conversions. If, for some reason, you
want to do it on your own, I believe xmerl_ucs:from_utf8/1 may serve you
well. But, that module is undocumented and thus not guaranteed to remain the
same from release to release.
I hope that helps!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions