IANA Name for UCS-4 does not appear in XMLUni.*
-----------------------------------------------
Key: XERCESC-1553
URL: http://issues.apache.org/jira/browse/XERCESC-1553
Project: Xerces-C++
Type: Improvement
Components: Utilities
Versions: 2.7.0
Environment: G++, Mac OS X
Reporter: Jerry Carter
Priority: Trivial
According to the IANA registry, http://www.iana.org/assignments/character-sets,
the preferred names for UCS-2 and -4 are 'ISO-10646-UCS-2' and
'ISO-10646-UCS-4' respectively. The UCS-2 name appears as
XMLUni::fgUTF16EncodingString7 but, although XMLUni.cpp defines other aliases
for UCS-4, the IANA name is excluded!
The XML 1.0 (Third Edition) specification states in section 4.3.3 that "In an
encoding declaration, the values 'UTF-8', 'UTF-16', 'ISO-10646-UCS-2', and
'ISO-10646-UCS-4' SHOULD be used for the various encodings and transformations
of Unicode / ISO/IEC 10646".
Although a 'SHOULD' and not a 'MUST' level requirement, the fix is so simple
that the next release should benefit from this change.
1) Insert in XMLUni.h at line 107:
static const XMLCh fgUCS4EncodingString4[];
2) Insert in XMLUni.h at line 358:
const XMLCh XMLUni::fgUCS4EncodingString4[] =
{
chLatin_I, chLatin_S, chLatin_O, chDash, chDigit_1, chDigit_0, chDigit_6,
chDigit_4, chDigit_6, chDash, chLatin_U, chLatin_C, chLatin_S, chDash,
chDigit_4, chNull
};
3) Insert in TransService.cpp at line 471:
gMappings->put
(
(void*)XMLUni::fgUCS4EncodingString4,
new EEndianNameMapFor<XMLUCS4Transcoder>
(
XMLUni::fgUCS4EncodingString4
, false
)
);
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]