views:

234

answers:

2

I'm pulling an RSS feed from a remote location using ServerXmlHttp:

Dim httpRequest
set httpRequest = server.createObject("Msxml2.ServerXMLHTTP.6.0")
httpRequest.open "GET", "http://www.someurl.com/feed.xml", false
httpRequest.send()
response.write httpRequest.responseXML.xml

However there must be encoding issues somewhere along the line as I'm seeing ???? where there should be some Japanese characters. Does anyone have any guidance when working with ServerXmlHttp?

Thanks.

A: 

When viewing in an unstructured web page, the browser may not be using the correct encoding.

When the XML is loaded into a parser like XMLDOM, the encoding should be respected and displayed correctly.

See XML Encoding for more information.

DaveB
+1  A: 

There are several possible issues here.

  1. What is the codepage and charset used by your ASP page?

This can either be set with the <%@ CodePage=xxxxx %> directive or Response.CodePage and Response.Charset.

  1. What is the encoding of th XML-file?

Classic ASP has notoriously bad support for these things, and the safest bet is to stick with a single encoding, preferably UTF-8 (CodePage 65001).

thomask