This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: 𡁀 coming out as ?
- From: Mike Brown <mike at skew dot org>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Fri, 8 Mar 2002 16:17:36 -0700 (MST)
- Subject: Re: [xsl] 𡁀 coming out as ?
- Reply-to: xsl-list at lists dot mulberrytech dot com
Randy Belknap wrote:
> I've got a .xsl file with the following html markup in it:
>
> <td>到</td><td>5/1/02</td>
>
> where 到 is the decimal value of a chinese character. The problem is
> that when I run the xsl through the transformer (MICROSOFT.XMLDOM), it
> outputs <td>?</td><td>5/1/02</td>. Is this enough information to know what
> I am doing wrong?
Post a code sample of how you are creating the document and invoking the
transformer, and where your result is going. I'm sure someone can point
out what you're doing wrong.
> I tried to get around the problem by used CDATA as follows:
>
> <td><![CDATA[到]]></td><td>5/1/02</td>
>
> but that produces <td>&#21040;</td><td>5/1/02</td>, so the browser
> displays &21040; instead of the chinese character.
As it should.
> (BTW, I thought CDATA
> was supposed to be not parsed at all.)
It is not parsed in the sense that it is not scanned for "&" and "<"
characters indicating the start of more markup, but it is parsed in the sense
that it is read by an XML parser and reported to the application as a block of
character data just like any other character data; it is not flagged as being
special in any way. It's just a convenience for the document author so you
don't have to escape "&" and "<". Most of the time you should just pretend
CDATA sections don't exist, because they won't help you in the way that you
want them to.
- Mike
____________________________________________________________________________
mike j. brown | xml/xslt: http://skew.org/xml/
denver/boulder, colorado, usa | personal: http://hyperreal.org/~mike/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list