error: stray '\302' in program

后端 未结 8 1292
谎友^
谎友^ 2021-01-17 16:11

I\'m using Code::Blocks on Ubuntu 10.10. I have connected a Mac keyboard and set the keyboard settings to \"Swiss German Mac\". Now whenever I write an equals sign, followed

8条回答
  •  误落风尘
    2021-01-17 16:48

    \302 stands for the octal representation of byte value the compiler encountered. It translates to 11000010 in binary, which makes me think it's the start of a two byte utf-8 sequence. Then this sequence must be:

    11000010 10??????
    

    Which encodes the binary unicode point 10??????, which can be anything from U+80 to U+BF.

    Several characters starting from U+80 are special spaces and breaks which usually are not shown inside a text editor.

    Probably it's not your editor but Xorg, that emits these characters due to your keyboard settings. Try switching to a generic US keyboard and test if the problems persists.

提交回复
热议问题