GNOME Bugzilla – Bug 520914
win_iconv doesn't support UCS-2
Last modified: 2008-03-12 14:07:03 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:
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.
Patch committed.
> Technically this is wrong of course, [...] That ought to be enough for demanding a comment in the code to explain why this is done.
(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.