[erlang-questions] UTF-8 problems

Dustin Whitney <>
Mon Feb 4 07:11:13 CET 2008

    I want to make an HTTP GET request to a URL that returns an XML
document, which I'd then like to run an XPath query against, but when I run
it, all I get is a list of integers when I output the response body.  I
think this is due to the charset being in UTF-8.  When I run the same
program against http://slashdot.org, I get back the html content from
slashdot in a readable form, and I think it's because slashdot
uses iso-8859-1 as it's charset.  How can I run XPath against what is
returned when the page uses UTF-8?  And how can I print UTF-8 to the
console, so I can actually read it?  Here is the small script I've written:


get_url() ->
{_,{_, Header, Body}} = http:request("

I appreciate any help.  Thanks,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080204/4f5dcc97/attachment.html>

More information about the erlang-questions mailing list