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

Re: IXSLProcessor - input in UTF-8?

Subject: Re: IXSLProcessor - input in UTF-8?
From: andrew welch <andrew.j.welch@xxxxxxxxx>
Date: Tue, 13 Sep 2005 16:18:07 +0100
Re:  IXSLProcessor - input in UTF-8?
On 9/13/05, Gabriel <gabriel.klappenbach@xxxxxxxxx> wrote:
> The input XML of course defines the encoding as UTF-8, and really is
encoded
> in UTF-8, but IXSLProcessor still reads it as ISO-8859-1. So it ignores the
> declaration in the XML file.
>
> The transform is taking place server side.
>
> So are you saying the IXSProcessor is supposed to be able to read the
> encoding specified in the XML file?

Yes - If the encoding is specified in the xml prologue in the file
then the xml parser has to read the file in that encoding - if it
doesn't then its non-conforming.

You may be doing by accident what I was trying to achieve the other
day - parse the file in a particular encoding ignoring the encoding
given in the prolog.  How are you reading the XML into the transform?
If it's in a non-xml aware way then you are likely reading the bytes
in the platform encoding and then the characters as XML.

In Java this is a FileInputStream -> InputStreamReader.  The
FileInputStream doesn't know about XML and so reads the file in
whatever encoding you tell it to.

If you post some code someone might know the equivalent in .Net

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.