After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 520914 - win_iconv doesn't support UCS-2
win_iconv doesn't support UCS-2
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: win32
2.14.x
Other All
: Normal normal
: ---
Assigned To: gtk-win32 maintainers
gtk-win32 maintainers
Depends on:
Blocks:
 
 
Reported: 2008-03-07 04:52 UTC by Daniel Atallah
Modified: 2008-03-12 14:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Suggested patch (1.06 KB, patch)
2008-03-10 12:44 UTC, Tor Lillqvist
none Details | Review

Description Daniel Atallah 2008-03-07 04:52:46 UTC
Please describe the problem:
As discussed in #gtk+, conversions from UCS-2BE to UTF-8 don't work with win_iconv.

My understanding is the plan is to make simple mapping to UTF-16 and to ignore the fact that surrogate pairs aren't supported in UCS-2.

Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Tor Lillqvist 2008-03-10 12:44:05 UTC
Created attachment 106964 [details] [review]
Suggested patch

This simple patch should make UCS-2 just an alias for UTF-16, as far as I can see. Technically this is wrong of course, but shouldn't matter in practise. Will commit to trunk once glib-2-16 has been branched (and to glib-2-16 once unfrozen), and assuming I have verified it actually works.
Comment 2 Tor Lillqvist 2008-03-12 00:06:30 UTC
Patch committed.
Comment 3 Morten Welinder 2008-03-12 13:44:13 UTC
> Technically this is wrong of course, [...]

That ought to be enough for demanding a comment in the code to explain
why this is done.
Comment 4 Daniel Atallah 2008-03-12 14:07:03 UTC
(In reply to comment #3)
> > Technically this is wrong of course, [...]
> 
> That ought to be enough for demanding a comment in the code to explain
> why this is done.

The code already has a disclaimer that it can't be used to validate the encoding.