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

Re: Character encodings

  • From: "Rick Jelliffe" <ricko@a...>
  • To: <xml-dev@i...>
  • Date: Tue, 8 Dec 1998 13:11:05 +1100

ftp character encoding
 From: Chris Maden <crism@o...>



>[Chris von See]

>A UCS-2 file starts with the byte order mark (BOM), \xFEFF.  The
>ordering of the two bytes shows whether the document is big-endian or
>little-endian.
>
>From 4.3.3:
>
>   Entities encoded in UTF-16 must begin with the Byte Order Mark
>   described by ISO/IEC 10646 Annex E and Unicode Appendix B (the ZERO
>   WIDTH NO-BREAK SPACE character, #xFEFF). This is an encoding
>   signature, not part of either the markup or the character data of the
>   XML document. XML processors must be able to use this character to
>   differentiate between UTF-8 and UTF-16 encoded documents.
>
>What's unsaid is that UCS-2 and UTF-16 are the same.

After the encoding signature (i.e., 8 bit|16 bit|32 bit and endianness)
has been detected
(e.g., from the BOM) and the code family (e.g., ASCII code-superset or
EBCDIC code-
superset) then the XML encoding header can be read. This can contain
usual header mechanism; the encoding attribute allows any IANA-registered
character
encoding name; you can explicitly specify
    "UTF-7",
    "UTF-8",
    "UTF-16"  (don't use "UNICODE-1-1" ),
    "ISO-10646-UCS-2", or
    "ISO-10646-UCS-4".

Actually, I cannot find UTF-16 in the IANA list at
    ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets
I don't know which crack it has slipped down.

But don't get caught up too much in the XML header. For web service, the
MIME headers are the authority. The XML headers are there to make
sure that the MIME headers can get their information from somewhere,
and for systems that are using non-HTTP file access. (In otherwords,
XML is a format developed for use with HTTP but it does not require
HTTP.)

Rick Jelliffe



xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


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.