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

Re: special character encoding, two problems

Subject: Re: special character encoding, two problems
From: "Eliot Kimber ekimber@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 16 Oct 2014 14:17:20 -0000
Re:  special character encoding
By "is otherwise a Unicode document" I really meant "is otherwise a
Unicode byte sequence as serialized". Of course all XML documents consist
of Unicode characters by definition.

In the case where the encoding of the bytes is a Unicode encoding, numeric
character references are *never* necessary. In the case where the encoding
of the bytes is not a Unicode encoding and there is not one-to-one
correspondence between characters in the encoding used and Unicode
characters, then numeric character references will be required for any
such characters, e.g., using some form of ASCII as the encoding.

But in that case, it still shouldn't matter (and certainly won't to any
conforming XML parser) what the details of the numeric character
references are: 2-digit hex, 4-digit hex, or decimal values.

If you know that non-XML-aware tools may be operating on your XML byte
sequences, essentially treating what should be consumed as UTF-8 as ASCII,
then it is probably necessary to use numeric character references, but in
that case you should probably just use the appropriate non-Unicode
encoding, because then everything is clear.

Cheers,

E.
bbbbb
Eliot Kimber, Owner
Contrext, LLC
http://contrext.com




On 10/16/14, 5:56 AM, "Wolfgang Laun wolfgang.laun@xxxxxxxxx"
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

>On 15 October 2014 21:23, Eliot Kimber ekimber@xxxxxxxxxxxx
><xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
>It also shouldn't matter how the characters are encoded if the XML
>document is otherwise a Unicode document (e.g., encoded in UTF-8 or
>UTF-16).
>
>
>
>XML requires Unicode (neither "if" nor "otherwise"). The encoding is not
>necessarily one of the UTF-*-encodings, which, I'm sure, the "e.g." was
>not meant to imply.
>
>
>I also wonder about the requirement to have numeric entities in hex.
>Weird.
>-W
>
>
>
>
>
>
>
>XSL-List info and archive
><http://www.mulberrytech.com/xsl/xsl-list>EasyUnsubscribe
><-list/1278982>
>(by email <>)

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.