[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

strange encoding problem

Subject: strange encoding problem
From: "Andreas Schildbach" <andreas@xxxxxxxxxxx>
Date: Fri, 1 Nov 2002 12:57:03 +0100
x transform encoding
i've got an utf-8 encoded xml file (test.xml) with an umlaut character, like
this:

<?xml version="1.0" encoding="UTF-8"?>
<a>ue</a> <!-- this is an &uuml; not the two chars u and e -->

i want to apply a simple xsl transformation (test.xml) to html, like this:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
        <xsl:output method="html" indent="yes" />
</xsl:stylesheet>

when i use the xslt-task of jakarta ant

<xslt in="test.xml" style="test.xsl" out="test.html" />

the result (test.html) is &uuml;
which is correct.

PROBLEM:

when i use tomcat, jsp and the jstl (java standard tag library) to apply the
transformation

<%@ taglib prefix="x" uri="http://java.sun.com/jstl/xml" %>
<c:import url="test.xml" var="xml"/>
<c:import url="test.xsl" var="xsl"/>
<x:transform xml="${xml}" xslt="${xsl}"/>

the result is &Atilde;&frac14;
which is NOT correct in my opinion.

- i made sure that the utf-8 encoded files are really utf-8 encoded (textpad
4.5.0 save-as encoding utf-8)
- i updated my software to the latest revisions:
   jdk 1.4.1_01
   tomcat 4.1.12
   jstl 1.02
   jakarta ant 1.5.1
- i searched for this problem on the internet/faqs

none of this helped. what am i doing wrong?

andreas


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.