printing utf8 in glib

后端 未结 4 822
日久生厌
日久生厌 2021-02-14 19:11

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:22

    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.

提交回复
热议问题