linux 下 C语言显示中文

例如:tset.c

  int main()

 {

    printf("你好,世界 ");

    retuen 0;

   }

编译时应该这样:

  iconv -f gb2312 -t utf8 test.c > test1.c       // -f  from  -t  to  从xxx格式到xxx格式

  gcc test1.c -o test1

我的是Ubuntu,系统用的是utf8

原文地址:https://www.cnblogs.com/qigaohua/p/5947766.html