This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: 𡁀 coming out as ?


Yuk. You've managed to output a chunk of UTF-16 text into the middle of an
output stream that is otherwise in UTF-8 or iso-8859-1 or something similar.
The two funny characters at the start of the double-spaced portion are a
byte-order mark indicating that UTF-16 text follows. The "OR" is what the
character 21040 looks like when you display the two bytes of the UTF-16
representation as if they were separate ASCII characters.

The diagnosis is easy, but I'll have to leave the solution to someone who
knows how to use ASP pages - I forgot years ago.

Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com

> -----Original Message-----
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of
> Randy Belknap
> Sent: 11 March 2002 20:47
> To: 'xsl-list@lists.mulberrytech.com'
> Subject: RE: [xsl] 𡁀 coming out as ?
>
>
> >Use
> >	xml.transformNodeToObject(style, Response);
>
> I used this command and got a different result listed below,
> but still not
> what I was looking for.  The two '&#21040's that go through
> the transformer
> come out as 'OR' and are displayed as 'OR' no matter what
> encoding I select.
> In addition, I get the a strange character pair before the '
> Hello' that I
> seems to be coming out of nowhere.  (As before the '&#21040'
> that does not
> go through the transformer does correctly display as a
> chinese character.)
>
> Thanks,
>
> Randy
>
>
> =====New Result=====
>
> <html>
> <body>
> <p>&#21040;<br>
> ÿþ  H e l l o :   0R  R a n d y   0R
> </body>
> </html>
>
>
> =====New Source=====
> <%@ Language=JScript %>
> <html>
> <body>
> <p>&#21040;<br>
> <%
> 	var style_data = "<?xml version=\"1.0\"?>" +
> 		 "<xsl:stylesheet
> xmlns:xsl=\"http://www.w3.org/TR/WD-xsl\";
> language=\"JScript\">" +
> 		 "<xsl:template match=\"/\">" +
> 		 " Hello: &#21040; <xsl:value-of select
> =\"greeting\"/>" +
> 		 "</xsl:template></xsl:stylesheet>";
>
> 	var style = new ActiveXObject("Microsoft.XMLDOM" );
> 	style.loadXML(style_data);
>
> 	var xml_data = "<greeting>Randy &#21040; </greeting>";
> 	var xml = new ActiveXObject( "Microsoft.XMLDOM" );
> 	xml.loadXML(xml_data);
>
> 	xml.transformNodeToObject(style, Response);
> %>
> </body>
> </html>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]