1
votes

I’m having difficulties producing ISO-8859-1-encoded text output from a UTF-8-encoded XML source using XSLT (using Oxygen to run the transformation).

For example, when the source contains an en dash, Oxygen throws up an error, “Output character not available in this encoding (decimal 8211)”.

The en dash is a character available in the ISO-8859-1 character set, and the processor knows that the source is encoded in UTF-8 (from its XML declaration). My XSLT contains

<xsl:output method="text" encoding="ISO-8859-1"/>

So why does it not simply replace the UTF-8-encoded character by the ISO-8859-1-encoded character? I can understand why characters available in Unicode but not in ISO-8859-1 might cause problems, but why characters available in both?

Is there a straightforward solution?

Thank you for any advice.

1
Which version of XSLT do you use? Can you also show your XML input?Mathias Müller

1 Answers

2
votes

As far as I can tell, ISO-8859-1 does not contain the Unicode character 8211/U2013, only Windows-1252 does. So oXygen or its XSLT processor are right about that error.