Hi Michael,

        Look to your character encodings for lo, they have tripped you up.


        I'd guess that your input file might not be encoded correctly, or that 
your output encoding doesn't officially support the characters you're feeding 
it. Yes, it works on your box when you say 'don't escape': you'd need to say 
what your system is and what encodings you're using before anyone could figure 
out why that might be.

        Chris


-----Original Message-----
From: michael UIN [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 08, 2004 12:26
To: [EMAIL PROTECTED]
Subject: Foreign characters



When I use stylesheet that I process with XALAN 2.3.1 that has

foreign characters     ñ ê ó ñ

they are escaped as    ñ ê ó 
ñ

which is not correct !?!?!!....

What am I doing wrong ?


I've tried setting the outputProperty in the Java code.....

           transformer.setOutputProperty(OutputKeys.ENCODING,"ISO-8589-1");
           transformer.transform(xmlSource, new 
javax.xml.transform.stream.StreamResult(myFileW));

as well in the XSL code.....

<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:output method="html" version="1.0" indent="yes"  encoding="ISO-8859-1" 
media-type="text/html"/>


I've also tried setting the encoding in java to UTF-16 with no luck.

Why is it escaping them incorrectly ???
Any ideas ?

Thanks in advance!


==============
XSL Snippet
=============

<b>Data is escaped</b>.....<xsl:value-of 
select='/DOCUMENT/DATA/INTL/ROW/name' />

<br/><br/><b>Data is NOT escaped</b>.....
       <xsl:value-of select='/DOCUMENT/DATA/INTL/ROW/name'  
disable-output-escaping="yes"/>


=============
HTML OUTPUT
=============

<b>Data is escaped</b>.....&Atilde;&plusmn; &Atilde;&ordf; &Atilde;&sup3; 
&Atilde;&plusmn;  &amp;<br>

<b>Data is NOT escaped</b>.....
              ñ ê ó ñ  &</body>

_________________________________________________________________
Take advantage of our limited-time introductory offer for dial-up Internet 
access. http://join.msn.com/?page=dept/dialup

Reply via email to