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

Re: Display of character 0x96 (#150) in IE, Firefox and Safari on Window

  • To: xml-dev@l...
  • Subject: Re: Display of character 0x96 (#150) in IE, Firefox and Safari on Windows and Mac
  • From: "andrew welch" <andrew.j.welch@g...>
  • Date: Fri, 21 Apr 2006 11:14:33 +0100
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=pV3rj6jz9AC3j9sL2ISoNtqIKlQYSLNasdNp0cz5WzDW3LInAOOy9WahkqDMr2i87gtYyrrNu0nqwaQM+Ng5sEvKVMDlPo8A3UraKAeU1aTPaTfOosjmqJ4awiv+g5iRYWYAjQupuvUyTdCu5+bSZMiajxsJoAdejLl4kb7MDFk=
  • In-reply-to: <74a894af0604210137s387076f9o8fb29f42a6f9dc22@m...>
  • References: <74a894af0604210137s387076f9o8fb29f42a6f9dc22@m...>

0x96
On 4/21/06, andrew welch <andrew.j.welch@g...> wrote:
> This file:
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE html
> PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html>
> <head>
> <title>test char 150</title>
> </head>
> <body>
> <p>x&#150;x</p>
> <p>Should see xx and not x dash x</p>
> </body>
> </html>
>
> Displays as x dash x (x-x) on both Windows and Mac, using IE, Firefox
> and Safari.
>
> If I've read it correctly, character 0x96 (#150) is only ever a dash
> in Windows-1252 (ANSI) whereas in Unicode it's a non-displayed control
> character.
>
> In the XML spec it states that the parser must only resolve character
> references using Unicode - so why do the browsers render #150 as a
> dash?
>
> I could understand IE doing it (always using a HTML parser), but not
> Firefox which (afaik) parses XHTML pages with an XML parser. Is it
> that the use of ANSI is so widespread that the browsers knowingly
> break the spec and render them anyway (again, something I wouldnt have
> thought of FF)

When the correct mime type is used with Firefox, such as text/xml,
then it does parse the file using an XML parser and it does indeed
drop the #150 - so Firefox behaves as expected.  It seems whenever an
HTML parser is used, it's perfectly ok to use C1 control characters
and expect them to be read using Windows 1252 numbers, regardless of
the charset used.

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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.