No subject
Fri Jan 24 13:26:13 EST 2003
http://www.w3.org/TR/2000/REC-xml-20001006#charencoding
<quote>
Each external parsed entity in an XML document may use a different enco=
ding
for its characters. All XML processors must be able to read entities in=
both the UTF-8 and UTF-16 encodings. The terms "UTF-8" and "UTF-16" in =
this
specification do not apply to character encodings with any other labels=
,
even if the encodings or labels are very similar to UTF-8 or UTF-16...
Although an XML processor is required to read only entities in the UTF-=
8
and UTF-16 encodings, it is recognized that other encodings are used ar=
ound
the world, and it may be desired for XML processors to read entities th=
at
use them. In the absence of external character encoding information (su=
ch
as MIME headers), parsed entities which are stored in an encoding other=
than UTF-8 or UTF-16 must begin with a text declaration (see 4.3.1 The =
Text
Declaration) containing an encoding declaration:
Encoding Declaration
=
=20
[80] EncodingDecl S 'encoding' Eq ('"' EncName '"' | "'" EncNa=
me "'" ) =20
:: =
=20
=3D =
=20
=
=20
[81] EncName [A-Za-z] ([A-Za-z0-9._] | '-')* =
/* Encoding name contains only =20
:: =
Latin characters */ =20
=3D =
=20
=
=20
In the document entity, the encoding declaration is part of the XML
declaration. The EncName is the name of the encoding used.
In an encoding declaration, the values "UTF-8", "UTF-16", "ISO-10646-UC=
S-2
", and "ISO-10646-UCS-4" should be used for the various encodings and
transformations of Unicode / ISO/IEC 10646, the values "ISO-8859-1", "
ISO-8859-2", ... "ISO-8859-n" (where n is the part number) should be us=
ed
for the parts of ISO 8859, and the values "ISO-2022-JP", "Shift_JIS", a=
nd "
EUC-JP" should be used for the various encoded forms of JIS X-0208-1997=
. It
is recommended that character encodings registered (as charsets) with t=
he
Internet Assigned Numbers Authority [IANA-CHARSETS], other than those j=
ust
listed, be referred to using their registered names; other encodings sh=
ould
use names starting with an "x-" prefix. XML processors should match
character encoding names in a case-insensitive way and should either
interpret an IANA-registered name as the encoding registered at IANA fo=
r
that name or treat it as unknown (processors are, of course, not requir=
ed
to support all IANA-registered encodings).
</quote>
- Peter
-----------------------------------------------------------------------=
----
Peter Constable
Non-Roman Script Initiative, SIL International
7500 W. Camp Wisdom Rd., Dallas, TX 75236, USA
Tel: +1 972 708 7485
E-mail: <peter_constable at sil.org>
=
More information about the Biblical-languages
mailing list