Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Posts
    406
    Thanks
    0
    Thanked 0 Times in 0 Posts

    creating XSL and chinese characters

    I created a website which have chinese letters/characters/paragraph. Some one sent me this html and now I have to convert this to XSL. I did convert the tags to xsl and when I compiled (using textpad). (what I ment by compiling is we use Java to talk to backend) Then I try to open the webpage, I couldnt. So when I looked at the text pad I saw the following error:

    Error on line 104 column 2 of ../chineesHelp.xsl:
    Error reported by XML parser: An invalid XML character (Unicode: 0xb9) was found in the CDATA section.
    Looking for:world_generalException


    So I am pasting the XSL section below. If this is wrong how can I do this?

    <![CDATA[

    <xsl:comment>

    ṩְʽHTMLͿɴӡPDFҪװ

    </xsl:comment>
    ]]>

    The characters which looks funny actually become chinese when I view the page

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I've no experience with non-latin coding - but - I use TextPad, and I don't believe it supports chinese; I don't think you can use it to edit such a document.

    Maybe - if you converted all the characters to their hex equivalent, you can work with it like that.

    This is all guesswork though; just what springs to mind.

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Posts
    406
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This thing was sent to me by some one as html. I just copied the text portion and pasted it into an existing XSL file.
    I didnt edit anything just copy paste thing.
    But how can I convert all this to hexadecimal characters? What ever comes out I am not going to under stand (I cannot read chinese). Where can I get the hexa decimal code?

  • #4
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    <?xml version="encodinghere"?>

    If you are having encoding issues, try changing encodinghere to the chinese charset.

  • #5
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    jkd, could you just use encoding="" in the xml declaration?
    i thought it supported that.

  • #6
    Moderator
    Join Date
    May 2002
    Location
    Hayward, CA
    Posts
    1,453
    Thanks
    1
    Thanked 21 Times in 19 Posts
    Yes, jkd was wrong. It's supposed to be:

    <?xml version="1.0" encoding="encodingHere"?>
    "The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
    June 30, 2001
    author, Verbosio prototype XML Editor
    author, JavaScript Developer's Dictionary
    https://alexvincent.us/blog

  • #7
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Not wrong, typo.

  • #8
    Regular Coder
    Join Date
    Jun 2002
    Posts
    406
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Finally its working now. I added the following in my XSL:

    <?xml version="1.0" encoding="GB2312"?>
    <html>

    <head>
    <title>Help</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
    </head>

    Thanks for all your help


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •