Chinese Chars in XML

Discussion in 'ASP General' started by tomtiv@gmail.com, Jul 21, 2006.

  1. Guest

    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
    , Jul 21, 2006
    #1
    1. Advertising

  2. <> wrote in message
    news:...

    [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
    Egbert Nierop \(MVP for IIS\), Jul 21, 2006
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    3,086
    Sylvain Lafontaine
    Feb 16, 2005
  2. Andy Lim
    Replies:
    0
    Views:
    398
    Andy Lim
    Oct 4, 2006
  3. Kosio

    Floats to chars and chars to floats

    Kosio, Sep 16, 2005, in forum: C Programming
    Replies:
    44
    Views:
    1,248
    Tim Rentsch
    Sep 23, 2005
  4. Hongyu
    Replies:
    9
    Views:
    887
    James Kanze
    Aug 8, 2008
  5. M.Posseth

    receiving ??? chars instead of "special" chars

    M.Posseth, Nov 15, 2004, in forum: ASP .Net Web Services
    Replies:
    3
    Views:
    215
    Dan Rogers
    Nov 16, 2004
Loading...

Share This Page