M
msnews.microsoft.com
Hey there, I'm having trouble reading Simple Chinese characters from an XML
document in an ASP file, I want to update the database based on what is in
the file. Everytime, I read in the characters they come out as ??.
Here's a snippet. Also here is my sample xml file:
http://dev4.labwerks.com/research/1_homepage.xml
Response.Charset = "utf-8"
Set objXML = Server.CreateObject("Microsoft.XMLDOM")
Set objLst = Server.CreateObject("Microsoft.XMLDOM")
Set objHdl = Server.CreateObject("Microsoft.XMLDOM")
objXML.async = False
objXML.Load (Request.ServerVariables( "APPL_PHYSICAL_PATH" ) &
strDirectoryUpload & "\\" & actualName)
If objXML.parseError.errorCode <> 0 Then
' handle the error
intErrorCode = 3
strErrorMessage = "There was a parser error in the xml file."
Else
Set objLst = objXML.getElementsByTagName("item")
noOfHeadlines = objLst.length
If IsNumeric(noOfHeadlines) Then
noOfHeadlines = Clng(noOfHeadlines)
End If
For i = 0 To (noOfHeadlines-1)
Set objHdl = objLst.item(i)
strItemID = objHdl.childNodes(0).text
strTitle = objHdl.childNodes(1).text
strLastUpdate = objHdl.childNodes(2).text
strEventCopy = objHdl.childNodes(3).text
strSortOrder = objHdl.childNodes(4).text
strContent = objHdl.childNodes(5).text
strLanguage1 = objHdl.childNodes(6).text <---- this is where I am
getting the chinese characters.
document in an ASP file, I want to update the database based on what is in
the file. Everytime, I read in the characters they come out as ??.
Here's a snippet. Also here is my sample xml file:
http://dev4.labwerks.com/research/1_homepage.xml
Response.Charset = "utf-8"
Set objXML = Server.CreateObject("Microsoft.XMLDOM")
Set objLst = Server.CreateObject("Microsoft.XMLDOM")
Set objHdl = Server.CreateObject("Microsoft.XMLDOM")
objXML.async = False
objXML.Load (Request.ServerVariables( "APPL_PHYSICAL_PATH" ) &
strDirectoryUpload & "\\" & actualName)
If objXML.parseError.errorCode <> 0 Then
' handle the error
intErrorCode = 3
strErrorMessage = "There was a parser error in the xml file."
Else
Set objLst = objXML.getElementsByTagName("item")
noOfHeadlines = objLst.length
If IsNumeric(noOfHeadlines) Then
noOfHeadlines = Clng(noOfHeadlines)
End If
For i = 0 To (noOfHeadlines-1)
Set objHdl = objLst.item(i)
strItemID = objHdl.childNodes(0).text
strTitle = objHdl.childNodes(1).text
strLastUpdate = objHdl.childNodes(2).text
strEventCopy = objHdl.childNodes(3).text
strSortOrder = objHdl.childNodes(4).text
strContent = objHdl.childNodes(5).text
strLanguage1 = objHdl.childNodes(6).text <---- this is where I am
getting the chinese characters.