Charset in XMLHTTP or an alternative solution?

S

Sune Christesen

Hi,

I'm trying to get some data from an external website using XMLHTTP, but my
problem is that the data is with special danish characters in (ÆØÅ), which
are being replaced with "?" due to UTF-8.
I've tried to specify the charset using response.charset, but that doesn't
seem to have any effect.

Any suggestions, or alternative solutions to XMLHTTP?
Thanks.
 
M

Martin Honnen

Sune said:
I'm trying to get some data from an external website using XMLHTTP, but
my problem is that the data is with special danish characters in (ÆØÅ),
which are being replaced with "?" due to UTF-8.

If you are using the responseText property then the server's response is
treated as UTF-8. But if the response is XML and sent with an XML MIME
type (e.g. application/xml or text/xml) then XMLHTTP uses the XML parser
to populate the responseXML property and the XML parser knows how to
deal with different encodings. Thus if the server sends XML then you can
read out the data from responseXML using the DOM.
Any suggestions, or alternative solutions to XMLHTTP?

ADODB.Stream can read from a URL and then gives you a byte stream you
can read out as text after you specify which encoding/charset you think
the stream is encoded as:
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdobjstream.asp>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,266
Messages
2,571,082
Members
48,772
Latest member
Backspace Studios

Latest Threads

Top