将GBK编码转成UTF-8放在Linux下编译出现error: stray ‘\xxx’ in program

从网页上找了一篇代码,在windows下整理好后,拿到Linux下编译,忘了编码的问题。然后用windows下的转换工具将文件的编码由gbk转到utf-8,但编译时出现

Socks5.h:34:1: error: stray ‘\200’ in program
Socks5.h:34:1: error: stray ‘\200’ in program
Socks5.h:35:1: error: stray ‘\343’ in program
Socks5.h:35:1: error: stray ‘\200’ in program
Socks5.h:35:1: error: stray ‘\200’ in program
Socks5.h:35:1: error: stray ‘\343’ in program
Socks5.h:35:1: error: stray ‘\200’ in program
Socks5.h:35:1: error: stray ‘\200’ in program
Socks5.h:36:1: error: stray ‘\343’ in program
Socks5.h:36:1: error: stray ‘\200’ in program
Socks5.h:36:1: error: stray ‘\200’ in program
Socks5.h:36:1: error: stray ‘\343’ in program
Socks5.h:36:1: error: stray ‘\200’ in program
Socks5.h:36:1: error: stray ‘\200’ in program
Socks5.h:37:1: error: stray ‘\343’ in program
Socks5.h:37:1: error: stray ‘\200’ in program

从网上知道是编码问题,后来自己发现是每行开始的空格编码有问题,估计是在转换时软件忽略了空格,没给转换,鄙视。。。说是要手动修改,可几百行,怎么改。想起了用gedit地换,选中某行的空格,选择替换,在替换replace with:输入一个空格,然后全部替换,这样就ok了!

你可能感兴趣的:(windows,linux)