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

RE: encoding woes: ISO-8859-1 vs. UTF-8

Subject: RE: encoding woes: ISO-8859-1 vs. UTF-8
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Tue, 23 Jul 2002 08:53:41 +0100
8221 characters
>   I am confused with the recent behavior described
> following regarding encoding.  I have a string "oLogo"
> in CSV, with those two weird characters actually being
> &#8220; and &#8221;, characters in General Punctuation
> II.
>   Here is the steps I am going through, consistently
> using ISO-8859-1 for encoding:

You can't be using ISO-8859-1 to encode the characters &#8220; and
&#8221; 

ISO-8859-1 can only encode the characters in the range 0-255.

Perhaps you were using some proprietary Microsoft 8-bit encoding that
includes these two characters?

Rather than showing us what the CSV file looks like on your screen
(which depends entirely on the software used to display it) it might
help to show us what it looks like in hex.

> A. Import CSV
>   1. convert CSV to generic XML: the string did not
> change, stayed "oLogo".
>   2. saxon convert generic XML to proprietary XML:
> string got converted to "&#8220;Log&#8221";
>   3. import successful

This looks as if everything is OK so far, although the original CSV file
can't have been in iso-8859-1 as you claim.

> B. Export into CSV
>   1. pull from MSSQL7 to proprietary XML: "oLogo"
>   2. saxon convert proprietary XML to CSV: exception
> org.xml.sax.SAXException: Output character not
> available in this encoding (decimal 8220)
>   Why going one way it works and not the other?

When you use 

<xsl:output method="text" encoding="iso-8859-1"/>

you can only output the characters available in iso-8859-1, namely the
XML characters in the range 0-255.

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 


 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.