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

Re: Character 150 withs Windows-1252 output

Subject: Re: Character 150 withs Windows-1252 output
From: "andrew welch" <andrew.j.welch@xxxxxxxxx>
Date: Fri, 21 Apr 2006 13:56:13 +0100
problem 0x96 xml
On 4/21/06, Michael Kay <mike@xxxxxxxxxxxx> wrote:
> > Why is it that #150 gets escaped when using Windows-1252
> > output encoding when it should contain that character?
> Because there is no character in the Windows-1252 character set that
> corresponds to the Unicode character with codepoint 150.

Yes, thanks.  That makes sense now.  The thing I'm struggling with now is

This source XML:

<?xml version="1.0" encoding="Windows-1252" ?>

With this stylesheet:

<xsl:stylesheet version="1.0"
<xsl:output encoding="US-ASCII"/>
<xsl:template match="/">
  <xsl:copy-of select="."/>

Gives this result:


I've checked the input file with a hex editor to make sure the
un-escaped dash really is 0x96.  Somehow the two characters are
treated differently, which is something I didn't expect.

I think that 0x96 in the input XML read using Windows-1252 should
become #8211 when output using any encoding other than Windows-1252,
which is what is happening for the actual character 0x96, but the
character reference #150 gets serialised back as #150...

Any thoughts?

Current Thread


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.
First Name
Last Name
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.