xsl-list
[Top] [All Lists]

Re: [xsl] Invalid byte 2 of 2-byte UTF-8 sequence exception while transforming

2007-02-02 03:26:43
On 2/2/07, Pankaj Bishnoi <pankaj(_dot_)bishnoi(_at_)adeptia(_dot_)com> wrote:
HI All
         I am using Xalan2.7.0 for transformation. I am getting a
"MalformedByteSequenceException:: Invalid byte 2 of 2-byte UTF-8 sequence"
exception while transforming a xml file. The encoding defined in input xml
is ISO-8859-1.  Complete stack trace is :::
javax.xml.transform.TransformerException:
org.apache.xerces.impl.io.MalformedByteSequenceException: Invalid byte 2 of
2-byte UTF-8 sequence.

It's because the encoding in the prolog (UTF-8) doesn't match the real
encoding of the file.  Fix whatever wrote the file to disk to write it
in the correct encoding, or adjust the prolog manually to reflect the
real encoding.

cheers
andrew

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--