[erlang-questions] kick start a newb!
Thu Feb 7 23:57:12 CET 2008
I modified the last line of my script to io:fwrite(Body). and that printed
it out for me in a human readable format. I will check out
xmerl_ucs:from_utf8/1 and see what it does. I want to run some XPath
against the document anyway, so I'll be looking at that module anyway. I
really appreciate the help.
On Feb 7, 2008 5:42 PM, Samuel Tesla <> wrote:
> 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!
> -- Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions