Now I want to display Chinese Characters in Linux
The Code is as follows:
# Include <clocale> # include <cwchar> void optionversion () {wchar_t wstr [] = l "Simplified Chinese version by Master♂Luo Yun "; wprintf (L" % ls ", wstr); exit (0 );}
Error converting to execution Character Set: Invalid or incomplete multi-byte or wide character.
No solution was found for Internet queries.
We found that the GCC or G ++ encoding needs to be specified.
For example, if my source file is GBK encoded, add the parameter-finput-charset = 'gbk'
Output Chinese, pleasing to the eye:
Luozhuang @ luozhuang-Virtual-machine ~ /Netbeansprojects/Onscripter-20121116cnlinux/Dist/release/GNU-Linux-x86 $. /onscripter-20121116cnlinux <init>: avifile release-0.7.48-120520-08: 05 -.. /src/configure <init>: available CPU flags: fpu vme de pse tsc msr pae mce cx8 APIC Sep mtrr pge mca cmov Pat limit 36 clflush dts mmx fxsr SSE sse2 ss nx rdtscp lm limit up limit pebs BTS xtopology limit <init>: 1995.53 MHz Intel (r) core (TM) i7-2630QM CPU @ 2.00 GHz processor detectedonscripter version 20120701 Simplified Chinese edition by Master Luo Yun (2.96) Can't open any of 0.txt, 00.txt, nscript. dat and nscript. ___ luozhuang @ luozhuang-Virtual-machine ~ /NET beansprojects/Onscripter-20121116cnlinux/Dist/release/GNU-Linux-x86 $