Jon A. Cruz wrote:
The problem is that things are casting 16-bit Unicode values to bytes by chopping all but the last 8 bits.
I'm going to be working on fixing this, but it is such a fundamental issue that I'm surprised we're not seeing more issues. Also I'll need to test a few more things and make sure I don't break more than I fix.
That's funny, I remember that the person who wrote the streams complained that GIO is broken because it doesn't handle UTF-8 natively, only byte streams.
The real in-depth solution would be to migrate to GIO streams everywhere, and code custom streams for things that we need. However, some of our devs don't have Glib 2.16 yet. Another issue is that the streams would have to be in plain GObject or use our custom bindings, because the existing C++ bindings don't expose the virtual functions (giomm devs thought that nobody would want to use them - actual answer from http://bugzilla.gnome.org/show_bug.cgi?id=572471).
A more short-term solution is of course fixing the existing streams.
Regards, Krzysztof Kosiński.