Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Chinese Chars in XML

Reply
Thread Tools

Chinese Chars in XML

 
 
tomtiv@gmail.com
Guest
Posts: n/a
 
      07-21-2006
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

 
Reply With Quote
 
 
 
 
Egbert Nierop \(MVP for IIS\)
Guest
Posts: n/a
 
      07-21-2006

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...

[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.




--
compatible web farm Session replacement for Asp and Asp.Net
http://www.nieropwebconsult.nl/asp_session_manager.htm


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to truncate char string fromt beginning and replace chars instring by other chars in C or C++? Hongyu C++ 9 08-08-2008 12:18 PM
Displaying Chinese chars with ASP.NET 2.0 Andy Lim ASP .Net 0 10-04-2006 08:53 AM
Floats to chars and chars to floats Kosio C Programming 44 09-23-2005 09:49 AM
receiving ??? chars instead of "special" chars M.Posseth ASP .Net Web Services 3 11-16-2004 07:00 PM
Re: How do I translate a Chinese web site and add Chinese character set to IE..? =A0 - =A0 Taking these two questions one at a time... =A Patrick Dunford NZ Computing 3 04-28-2004 07:15 PM



Advertisments