Source code encoding issues under different platforms

The source file uses GBK encoding by default in visual studio, and UTF-8 encoding by default in Linux;

If the same source file contains Chinese, it will cause compilation errors if encoding options are not specified under different platforms; the source code can be saved in UTF-8 (with signature) mode to avoid compilation problems caused by source files containing Chinese characters.

Conversion tool

iconv -f gkb -t utf8 -o utf8.c  gbk.c

Guess you like

Origin blog.csdn.net/beebeeyoung/article/details/111602329