Can someone help me trying to display Chinese characters in Saxon:
I get an error message:
Transformer Exception : Character conversion error: "Malformed UTF-8 char
-- is an XML encoding declaration missing?" (line number may be too low).
when trying to display the characters.
From: Paul Libbrecht <paul@ac...> - 2002-04-05 22:58:18
How about trying "native2ascii -encoding UTF-8 yourXMLfile"
If it gives the same error then your file is encoded in a different
encoding which you have to find (web-browsers can generally display
anything using any encoding, try to get the best viewable result when
changing the encoding), this would give you the name of the encoding
which, hopefully is the java name of your encoding.
Invoking then "native2ascii -encoding yourEncoding yourXMLfile" should
give no errors. You're left then an adjustment in the encoding header of
the XML file which you do with the following:
<?xml version="1.0" encoding="utf-8"?>
Changing utf-8 to the iana name of your encoding.
As of the differences between iana encoding names and java encoding
names, please see the documentation of the native2ascii tool (in the
docs of the jdk). In many cases it is the same, in some it is not. If
it's the same, then it will work with Saxon's parser, otherwise, you're
left to hope that Saxon's parser has mapping for your encoding name.
On Vendredi, avril 5, 2002, at 06:45 , Gail Buffington wrote:
> Can someone help me trying to display Chinese characters in Saxon:
> I get an error message:
> Transformer Exception : Character conversion error: "Malformed UTF-8
> char -- is an XML encoding declaration missing?" (line number may be
> too low).
> when trying to display the characters.
> Thank you,
> Gail Buffington
> Keithley Instruments
> saxon-help mailing list