Short question: Is there a way to force glib's g_print()
to use UTF-8 encoding?
The problem I hit is that g_print()
seems to do character set conversion based on the return value of g_get_charset()
. Now the documentation unfortunately mentions
On Windows the character set returned by this function is the so-called system default ANSI code-page.
However nowadays modern consoles are available: MSYS consoles typically support (and use) UTF-8 by default and even the default Windows console can be set to use UTF-8 encoding.
Now it seems Windows has finally catched up and glib is limiting me to a 255 character code page after all???
I'd simply switch my code to plain printf
but unfortunately g_print
is called in many locations from inside glib and gtk libraries, as well as their C++ bindings glibmm and gtkmm and I obviously have no easy possibility to change anything about that short of patching and compiling glib myself, so I really hope there's a solution to that.
Note: Just saw the part calling local_glib_print_func()
in the definition of g_print()
. Aynbody knows what this is about and if I could exploit it for my purposes?