...

creating XSL and chinese characters

chelvis
03-07-2003, 08:28 PM
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

brothercake
03-07-2003, 08:51 PM
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.

chelvis
03-07-2003, 09:05 PM
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?

jkd
03-07-2003, 11:28 PM
<?xml version="encodinghere"?>

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

cg9com
03-10-2003, 04:43 PM
jkd, could you just use encoding="" in the xml declaration?
i thought it supported that.

Alex Vincent
03-12-2003, 04:00 AM
Yes, jkd was wrong. It's supposed to be:

<?xml version="1.0" encoding="encodingHere"?>

jkd
03-12-2003, 04:48 AM
Not wrong, typo. :p

chelvis
03-12-2003, 02:40 PM
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 :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum