tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Lea <ja...@kumachan.net.nz>
Subject Re: Unicode support in JSTL xml tags
Date Thu, 28 Aug 2003 05:02:29 GMT
Hi Siddharth,

You might have to specify the charEncoding for the <c:import> because it 
might be defaulting to ISO-8859-1.

Try this:

<c:import url="test.xml" var="xfile" charEncoding="UTF-8" />



Siddharth wrote:

> Hi,
> 
> I am trying to parse a xml file with a non-english Unicode content using jstl's xml tag.
But I get the error, "Content not allowed in Prolog". I tried to parse the same xml with other
parsers like msxml, jaxp and it works fine. I can even print the textual form of the xml using
<c:out>. Where am I going wrong? Is there something I should do before parsing Unicode
xml files? 
> 
> This is the sample xml file, test.xml :
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <root>
> 	வேர்
> </root>
> 
> and the JSTL code was,
> 
> <c:import url="test.xml" var="xfile"/>
> <x:parse xml="${xfile}" var="xdoc"/>
> <x:out select="$xdoc/root"/>
> 
> 
> Thanx for the attention.
> 
> Siddharth.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
> 
> 


-- 
Jason Lea


Mime
View raw message