UTF-16
------

         Key: XERCESJ-1073
         URL: http://issues.apache.org/jira/browse/XERCESJ-1073
     Project: Xerces2-J
        Type: Bug
  Components: Serialization  
    Versions: 2.6.2    
    Reporter: patins
    Priority: Minor


Hello,

I have written an open-source XML editor at http://xdoc.sourceforge.net using 
Xerces
and have already a fix for following bug:

If you save an XML document with the UTF-16 encoding to disk,
every unicode character is escaped as character entity if
above 0x7F.  This is not very efficient since UTF16 takes
at least 2 bytes for each character in any case..

By replacing 
         fIANA2JavaMap.put("UTF-16",           "UTF-16");
with
         fIANA2JavaMap.put("UTF-16",           "Unicode");
in EncodingMap.java, I have fixed the error (in my program). 
This is the symmetric operation to 
fJava2IANAMap.put("Unicode",   "UTF-16"); 
in the same file by the way.

The detailed effect the bug has if not fixed:
The encoding will not be recognized as 
Unicode in Encodings.java and the last
 printable character will be DEFAULT_LAST_PRINTABLE instead of 
LAST_PRINTABLE_UNICODE. This results in that every character greater than 0x7F 
will be escaped by a character reference.

Cu
J�rg



-- 
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]

Reply via email to