开发者

strange character "â" in cmake generated makefile errors

开发者 https://www.devze.com 2023-01-05 08:23 出处:网络
Terrible title, sorry.I used cmake to generate a makefile and I specified g++ as the C++ compiler and when I run the generated makefile using make or gmake I get all these c开发者_StackOverflow中文版o

Terrible title, sorry. I used cmake to generate a makefile and I specified g++ as the C++ compiler and when I run the generated makefile using make or gmake I get all these c开发者_StackOverflow中文版ompile errors and all my symbols have trailing â's on them. Any thoughts on what might be behind these mysterious â's?


You probably have the LANG environmental variable setup incorrectly. Try setting it to C or en_US.

If using bash something like export LANG=C or export LANG=en_US should solve your problem.


They're Unicode quote marks, LEFT and RIGHT SINGLE QUOTATION MARK, which are encoded in UTF-8 as "\xE2\x80\x98" and "\xE2\x80\x99". And '\xE2' in Latin-1 is 'â'.

So your choices are to figure out why your terminal is not interpreting UTF-8 correctly, or to tell g++ not to generate them. The latter is done by setting LANG=C or so, as the_void noted, which will cause the compiler to emit ordinary ASCII quote marks instead.

0

精彩评论

暂无评论...
验证码 换一张
取 消