Thank you for the clarification.
From: Michael Kay [mailto:mhkay@...]
Sent: Friday, September 21, 2001 4:41 AM
To: 'Wolfgang Bogacz'; saxon-help@...
Subject: RE: [saxon] UTF-16 problem in 6.4.4
> I have a batch of SVG files with an encoding of UTF-16
> declared, which have
> transformed up through v6.4.3 without complaint.
> When transforming this same batch now using v6.4.4, each file
> (400 of them)
> 'Failed to load UTF-16'
> yet the output comes with an encoding declaration of UTF-16.
> Is this a bug?
No, it's a feature ;-)
The only thing that's changed is the message: it's warning you of a
condition that previously went unreported, namely that you have requested an
encoding which isn't directly supported by Saxon and for which you haven't
supplied a plug-in. Saxon attempts to recover from this situation by (a)
hoping that the Java VM supports the required encoding, and (b) hoping that
the encoding supports all ASCII characters, and using character references
for non-ASCII characters. In your case this recovery strategy is successful.
The fact that Saxon doesn't include UTF-16 in its list of natively-supported
encodings is an oversight, thanks for bringing it to my attention.
It's not a bug, because the software is behaving as documented. I quote from
The encodings available on output are the intersection of:
ascii, us-ascii, utf-8, utf8, iso-8859-1, iso-8859-2
ko18-r, cp1250, windows-1250, cp1251, windows-1251
with whatever your Java VM supports.
If you select an encoding that the Java VM recognizes, but which is not in
above list, then the output will be written in the requested encoding, but
characters will be written as character references.