1。安装enconv:sudo apt-get install enca

2.enconv -L zh_CN -x UTF-8 filename

如果多个文件,则使用*.c/*.cpp