GNOME Bugzilla – Bug 601874
GLib Unicode Manipulation section clearly says to use g_utf32_to_utf8() / g_utf8_to_utf32() but they don't exist
Last modified: 2009-11-15 23:10:21 UTC
The very start of the "Unicode Manipulation" chapter in the GLib reference library says: "gunichar A type which can hold any UTF-32 or UCS-4 character code, also known as a Unicode code point. To print/scan values of this type to/from text you need to convert to/from UTF-8, using g_utf32_to_utf8()/g_utf8_to_utf32()." However, neither of the functions g_utf32_to_utf8() nor g_utf8_to_utf32() exist. Kind of a problem when trying to do processing of UTF-8 characters in my application. Will hopefully find the correct function names with some Googling, but the docs should probably have this updated so not as to confuse further people.
Hello Justin, You are rigth, you can use g_ucs4_to_utf8/g_utf8_to_ucs4 instead. Patch attached to fix the documentation problem Thank you for your bug report
Created attachment 147754 [details] [review] Suggest g_ucs4_to_utf8/g_utf8_to_ucs4
Thanks Javier, and no worries. Found g_ucs4_to_utf8() last night after some experimentation and have it working the way that's needed. :)
Comment on attachment 147754 [details] [review] Suggest g_ucs4_to_utf8/g_utf8_to_ucs4 commit 18b3ff33afad10dfac7dfdf3025313490f8313cc
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.