You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Kelly Zeng <ze...@lhc.nlm.nih.gov> on 2002/10/04 17:27:43 UTC

sltc problem parsing numeric entities and UTF-8 characters

 I am using xsltc to transform xml to html.  I had &#253 in the input
xml
document and i see &#253 replaced by ? in the output html.  Also, if i
save a xml document in UTF-8,  <C3><BD> is also turned into ? in the
output html.  Is there anything i need to do to tell XSLTC to parse
numeric entities and non-ascii UTF-8 characters correctly?

THANK YOU!!!

:)Kelly


Re: sltc problem parsing numeric entities and UTF-8 characters

Posted by Santiago Pericas-Geertsen <Sa...@sun.com>.
----- Original Message -----
From: "Kelly Zeng" <ze...@lhc.nlm.nih.gov>
To: "Santiago Pericas-Geertsen" <Sa...@Sun.COM>
Cc: "Kelly Zeng" <ze...@lhc.nlm.nih.gov>; <xa...@xml.apache.org>
Sent: Friday, October 04, 2002 12:18 PM
Subject: Re: sltc problem parsing numeric entities and UTF-8 characters


> in the browser, i still see ?, ( i did set the encoding to UTF-8).

 I see. In that case, could you provide a sample xml/xsl? The UTF-8 encoding
of the Unicode char 253 should be a 2-byte sequence. Before loading the html
file in the browser, can you see this 2-byte sequence in the file? (try
using a low-level editor such as "vi")

-- Santiago



Re: sltc problem parsing numeric entities and UTF-8 characters

Posted by Kelly Zeng <ze...@lhc.nlm.nih.gov>.
in the browser, i still see ?, ( i did set the encoding to UTF-8).

Santiago Pericas-Geertsen wrote:

> Kelly:
>
>  How does your html file look in a browser? XSLT Processors are not required
> to escape non-ascii chars using a numeric sequence like &#253;. If you bring
> up your html file in a browser (and set UTF-8 encoding if not set
> automatically by the browser) you should see the char in question.
>
> -- Santiago
>
> ----- Original Message -----
> From: "Kelly Zeng" <ze...@lhc.nlm.nih.gov>
> To: <xa...@xml.apache.org>
> Cc: <ze...@nlm.nih.gov>
> Sent: Friday, October 04, 2002 11:27 AM
> Subject: sltc problem parsing numeric entities and UTF-8 characters
>
> > I am using xsltc to transform xml to html.  I had &#253 in the input
> > xml
> > document and i see &#253 replaced by ? in the output html.  Also, if i
> > save a xml document in UTF-8,  <C3><BD> is also turned into ? in the
> > output html.  Is there anything i need to do to tell XSLTC to parse
> > numeric entities and non-ascii UTF-8 characters correctly?
> >
> > THANK YOU!!!
> >
> > :)Kelly
> >


Re: sltc problem parsing numeric entities and UTF-8 characters

Posted by Santiago Pericas-Geertsen <Sa...@sun.com>.
Kelly:

 How does your html file look in a browser? XSLT Processors are not required
to escape non-ascii chars using a numeric sequence like &#253;. If you bring
up your html file in a browser (and set UTF-8 encoding if not set
automatically by the browser) you should see the char in question.

-- Santiago

----- Original Message -----
From: "Kelly Zeng" <ze...@lhc.nlm.nih.gov>
To: <xa...@xml.apache.org>
Cc: <ze...@nlm.nih.gov>
Sent: Friday, October 04, 2002 11:27 AM
Subject: sltc problem parsing numeric entities and UTF-8 characters


> I am using xsltc to transform xml to html.  I had &#253 in the input
> xml
> document and i see &#253 replaced by ? in the output html.  Also, if i
> save a xml document in UTF-8,  <C3><BD> is also turned into ? in the
> output html.  Is there anything i need to do to tell XSLTC to parse
> numeric entities and non-ascii UTF-8 characters correctly?
>
> THANK YOU!!!
>
> :)Kelly
>