Chinese Chars in XML

T

tomtiv

Hi All,

I am having a probem with asp, xml, com while using chinese chars. The
chinese letters come out of com fine and they are also fine when i use
asp to write to a text file.
When i load the chinese chars into an xml dom they become invalid

Chinese chars show as this æˆ'çš,,模æ¿. but when i doa
xsl translation then some of the chinese chars are displayed and some
are shown as garbage chars.

My ASP Page has the following headers

<%@Language=VBScript CodePage="65001"%>

<%
Response.CharSet = "UTF-8"
Response.ContentType = "text/html"
%>

My XSL has the following header <?xml version="1.0" encoding="UTF-8"?>

Any Ideas?

Thanks,
Thomas
 
E

Egbert Nierop \(MVP for IIS\)

[Hi All,


My XSL has the following header <?xml version="1.0" encoding="UTF-8"?>

Any Ideas?

]


Hiya!

How do you view the data? Note that if you use notepad, that possibly
notepad wrongly assumes to deal with ANSI.
To get a real utf-8 compatible document, you should prepend the following
bytes to your html page.


Response.BinaryWrite ChrB(&HEF)

Response.BinaryWrite ChrB(&HBB)

Response.BinaryWrite ChrB(&HBF)

Response.Write "<?xml version=""1.0"" encoding=""UTF-8""?>"

etc...

I've never tested this but it might be the solution.
 

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
473,995
Messages
2,570,228
Members
46,816
Latest member
nipsseyhussle

Latest Threads

Top