xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: Wolfgang Hoschek <whoschek AT lbl.gov>
- To: xom-interest AT lists.ibiblio.org
- Subject: [XOM-interest] Character conversion problem
- Date: Wed, 3 Nov 2004 15:00:18 -0800
Hi,
Some characters such as "񐀀" and "'[[[񐀀]]]'" seem to get turned by XOM to "?" characters.
I've seen similar things before when using byte to char conversions, both with the nio converters and the java.lang.String converters. Any ideas on what could be done about it, or what I'm doing wrong here?
[hoschek /Users/hoschek/unix/devel] cat test.xsl
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- test use of high Unicode characters in character maps. -->
<xsl:output method="xml" use-character-maps="map02" encoding="iso-8859-1"/>
<xsl:character-map name="map02">
<xsl:output-character character="񐀀" string="#####"/>
</xsl:character-map>
<xsl:template match="/">
<v><xsl:value-of select="'[[[񐀀]]]'"/></v>
</xsl:template>
</xsl:stylesheet>
------------------------------------------------
here is what Document.toXML() and the XOM serializer print after new Builder(false).build(File):
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- test use of high Unicode characters in character maps. -->
<xsl:output method="xml" use-character-maps="map02" encoding="iso-8859-1" />
<xsl:character-map name="map02">
<xsl:output-character character="?" string="#####" />
</xsl:character-map>
<xsl:template match="/">
<v><xsl:value-of select="'[[[?]]]'" /></v>
</xsl:template>
</xsl:stylesheet>
-
[XOM-interest] Character conversion problem,
Wolfgang Hoschek, 11/03/2004
- Re: [XOM-interest] Character conversion problem, Elliotte Harold, 11/04/2004
-
Re: [XOM-interest] Character conversion problem,
Elliotte Harold, 11/04/2004
- Re: [XOM-interest] Character conversion problem, Wolfgang Hoschek, 11/04/2004
Archive powered by MHonArc 2.6.24.