You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Boris Kolpackov (JIRA)" <xe...@xml.apache.org> on 2006/12/31 16:12:20 UTC
[jira] Created: (XERCESC-1663) IconvGNU and IconvFBSD based
transcoders assume UCS-2 as XMLCh encoding
IconvGNU and IconvFBSD based transcoders assume UCS-2 as XMLCh encoding
-----------------------------------------------------------------------
Key: XERCESC-1663
URL: http://issues.apache.org/jira/browse/XERCESC-1663
Project: Xerces-C++
Issue Type: Bug
Components: Utilities
Affects Versions: 2.7.0
Environment: any
Reporter: Boris Kolpackov
I was studying the code in IconvGNU and IconvFBSD transcoders and it appears that they assume UCS-2 is the encoding for XMLCh when it's actually UTF-16. I believe this can result in the loss of data.
The encoding that is used for XMLCh is stored in the fUnicodeCP variable which is initialized in the Iconv{GNU,FBSD}TransServices c-tor. The initialization code just tries all encodings from the gIconv{GNU,FBSD}Encodings array which for GNU contains only UCS-2 and for FreeBSD contains UCS-2 and UCS-4 encodings.
I tried to add a UTF-16LE to this array (as a first item) and it works fine for GNU (I double checked that UTF-16LE ends up in fUnicodeCP). Does anybody knows what's going on here? Should we add UTF-16 to these arrays?
--
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: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org
[jira] Updated: (XERCESC-1663) IconvGNU and IconvFBSD based
transcoders assume UCS-2 as XMLCh encoding
Posted by "Boris Kolpackov (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESC-1663?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Boris Kolpackov updated XERCESC-1663:
-------------------------------------
Priority: Blocker (was: Major)
Fix Version/s: 2.9.0
3.0.0
Seeing that GNU Iconv, when available, is preferred over Iconv, we should try to fix this for 3.0.0.
> IconvGNU and IconvFBSD based transcoders assume UCS-2 as XMLCh encoding
> -----------------------------------------------------------------------
>
> Key: XERCESC-1663
> URL: https://issues.apache.org/jira/browse/XERCESC-1663
> Project: Xerces-C++
> Issue Type: Bug
> Components: Utilities
> Affects Versions: 2.7.0
> Environment: any
> Reporter: Boris Kolpackov
> Priority: Blocker
> Fix For: 3.0.0, 2.9.0
>
>
> I was studying the code in IconvGNU and IconvFBSD transcoders and it appears that they assume UCS-2 is the encoding for XMLCh when it's actually UTF-16. I believe this can result in the loss of data.
> The encoding that is used for XMLCh is stored in the fUnicodeCP variable which is initialized in the Iconv{GNU,FBSD}TransServices c-tor. The initialization code just tries all encodings from the gIconv{GNU,FBSD}Encodings array which for GNU contains only UCS-2 and for FreeBSD contains UCS-2 and UCS-4 encodings.
> I tried to add a UTF-16LE to this array (as a first item) and it works fine for GNU (I double checked that UTF-16LE ends up in fUnicodeCP). Does anybody knows what's going on here? Should we add UTF-16 to these arrays?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org
[jira] Resolved: (XERCESC-1663) IconvGNU and IconvFBSD based
transcoders assume UCS-2 as XMLCh encoding
Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESC-1663?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alberto Massari resolved XERCESC-1663.
--------------------------------------
Resolution: Fixed
Assignee: Alberto Massari
Fix is in SVN
> IconvGNU and IconvFBSD based transcoders assume UCS-2 as XMLCh encoding
> -----------------------------------------------------------------------
>
> Key: XERCESC-1663
> URL: https://issues.apache.org/jira/browse/XERCESC-1663
> Project: Xerces-C++
> Issue Type: Bug
> Components: Utilities
> Affects Versions: 2.7.0
> Environment: any
> Reporter: Boris Kolpackov
> Assignee: Alberto Massari
> Priority: Blocker
> Fix For: 3.0.0, 2.9.0
>
>
> I was studying the code in IconvGNU and IconvFBSD transcoders and it appears that they assume UCS-2 is the encoding for XMLCh when it's actually UTF-16. I believe this can result in the loss of data.
> The encoding that is used for XMLCh is stored in the fUnicodeCP variable which is initialized in the Iconv{GNU,FBSD}TransServices c-tor. The initialization code just tries all encodings from the gIconv{GNU,FBSD}Encodings array which for GNU contains only UCS-2 and for FreeBSD contains UCS-2 and UCS-4 encodings.
> I tried to add a UTF-16LE to this array (as a first item) and it works fine for GNU (I double checked that UTF-16LE ends up in fUnicodeCP). Does anybody knows what's going on here? Should we add UTF-16 to these arrays?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org