Problem Description
Many editors are generally the default file saved as utf-8, but there have been garbled output when the Chinese? Also tried other methods, some garbled, and some chaos?
There are two parameters gcc -finput-charset
encoding specifies the source file, -fexec-charset
specified multibyte string (const char *) constants stored in the compiled program code set.
MinGW gcc compiler utf-8 file when garbled
MinGW gcc compiler gbk file when normal
MinGW gcc compiler utf-8 file -fexec-charset = gbk display Chinese
MinGW gcc