[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: SAXON and UTF-8

Subject: RE: SAXON and UTF-8
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Thu, 27 Sep 2001 14:27:37 +0100
saxon 8 xslt newline
> Newbie observations: I get the following error when feeding
> SAXON with a XML document with UTF-8 encoding.
>
> --
> E:\test\sampledocs>saxon dataseq.xml sampledoc.xsl > dataseq.fo
> Fatal error reported by XML parser: required character (found
> "?") (expected
> "<"
> )
>   URL:    file:/E:/test/sampledocs/dataseq.xml
>   Line:   1
>   Column: 5
> Error
>   required character (found "?") (expected "<")

This message suggests that there's no problem with your UTF-8, but there is
a problem with your XML. Without seeing the file, I can't tell you what the
problem is.

> Saving in "plain text" triggers the appropriate error message
> from SAXON:
>
> E:\test\sampledocs>saxon dataseq.xml sampledoc.xsl > dataseq.fo
> Fatal error reported by XML parser: bad continuation of
> multi-byte UTF-8 sequence (character code: 0x72)
>   URL:    file:/E:/test/sampledocs/dataseq.xml
>   Line:   -1
>   Column: 1477
> Error
>   bad continuation of multi-byte UTF-8 sequence (character code: 0x72)
> Transformation failed
>
> That error message could have been better.

Yes. AElfred first tries to decode a buffer-full of bytes into characters,
and then looks for the newline characters that determine line endings. If it
fails in the first step, then the line number is -1 and the column number is
the byte offset where it hit trouble. In general, if the file is not in the
expected encoding then line boundaries will not be detected correctly.

Mike Kay
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.