You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "patins (JIRA)" <xe...@xml.apache.org> on 2005/05/10 00:29:05 UTC
[jira] Created: (XERCESJ-1073) UTF-16
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: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org
[jira] Assigned: (XERCESJ-1073) UTF-16
Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
[ http://issues.apache.org/jira/browse/XERCESJ-1073?page=all ]
Michael Glavassevich reassigned XERCESJ-1073:
---------------------------------------------
Assign To: Michael Glavassevich
> 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
> Assignee: Michael Glavassevich
> 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: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org
[jira] Resolved: (XERCESJ-1073) UTF-16
Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
[ http://issues.apache.org/jira/browse/XERCESJ-1073?page=all ]
Michael Glavassevich resolved XERCESJ-1073:
-------------------------------------------
Resolution: Fixed
Actually the consequence was that we'd check every character higher than 0x7F using a charset encoder; considerably slower than checking if the character is less than or equal to 0xFFFF. I've added UTF-16 to the UNICODE_ENCODINGS array rather than modifying the EncodingMap.
> 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
> Assignee: Michael Glavassevich
> 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: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org