This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Problem with XT and encoding?
- To: xsl-list at lists dot mulberrytech dot com
- Subject: RE: [xsl] Problem with XT and encoding?
- From: "Clapham, Paul" <pclapham at core-mark dot com>
- Date: Wed, 30 May 2001 08:32:06 -0700
- Reply-To: xsl-list at lists dot mulberrytech dot com
Yes, it is a simple encoding issue. You have specified the encoding of your
input XML as ISO-8859-1, but you have not specified the encoding of your
output XML, so it defaults to UTF-8. This encoding requires 2 (or more
bytes) for characters above Unicode 127. Try this:
<xsl:output omit-xml-declaration="yes" encoding="ISO-8859-1"/>
PC2
-----Original Message-----
From: Mark Kennedy [mailto:MarkK@fool.com]
Sent: May 30, 2001 08:17
To: 'XSL-List@lists.mulberrytech.com'
Subject: [xsl] Problem with XT and encoding?
Hello, all:
I'm having a problem with transformations using XT when using characters
that are outside of the standard ASCII 127, and I can't figure out why. In
the following examples, the » is character 187 in ISO-8859-1 (Latin 1). That
character (and seemingly any character greater than the standard 127) gets
turned into two characters, i.e. the » gets turned into »
I imagine this is some simple encoding issue, but I'm flummoxed. The only
other XSLT engine that I have available for testing is the MSXML in IE5, and
I don't get this result with it, though I don't really think that means
much.
I'm running the Win32 binary of XT on and NT machine.
Any suggestions are appreciated!
Input XML File:
<?xml version='1.0' encoding='ISO-8859-1'?>
<test>»</test>
XSLT File:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output omit-xml-declaration="yes"/>
<xsl:template match="/">
<xsl:copy-of select="test"/>
</xsl:template>
</xsl:stylesheet>
Resulting XML File:
<test>»</test>
______________________
Mark Kennedy
markk@fool.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list