printing utf8 in glib

后端 未结 4 1420
北荒
北荒 2021-02-14 18:43

Why utf8 symbols cannot be printed via glib functions?

Source code:

#include \"glib.h\"
#include 

int main() {
    g_print(\"марко\\n\");         


        
4条回答
  •  温柔的废话
    2021-02-14 19:24

    The string passed from g_print() to glibc is not necessarily in UTF-8 encoding since g_print() does character set conversion to the charset specified by the locale.

提交回复
热议问题