I’m using Code::Blocks on Ubuntu 10.10 (Maverick Meerkat). I have connected a Mac keyboard and set the keyboard settings to "Swiss German Mac". Now whenever I write an equals sign, followed by a space (something like width = 100) I get the error message: stray ‘\302’ in program.
I know this error means that there is a non-standard character in the text file.
When I delete the space character, the program compiles just fine. So that means Code::Blocks adds some sort of special character. But I can’t see why this happens. What is the reason?
What character does ‘\302’ stand for?
[UPDATE]
I got a little further investigating the problem. I get this stray when I use the combo Shift + Space. Now that I know it doesn’t happen that often any more. But it’s still rather annoying especially when writing code… Is there a way to turn off this combo in X11?
[SOLVED]
Thanks to Useless’s answer, I was able to solve the "issue". It’s more of a feature actually. Shift + space created a spacenolinebreak by default. So by changing the xmodmap with
xmodmap -e "keycode 65 = space space space space space space"
this behavior was overridden and everything works fine now.
Since you’re sure it’s caused by hitting Shift + Space, you can check what X itself is doing by. First, run
xevfrom the command line, hit Shift + Space and check the output. For example, I see:Then, run
xmodmap -pkand look up the keycode (space should be 65 as above, but check your xev output).If you see something like
Then X isn’t doing this. On the other hand, if I pick a character key which is modified by
shift, I see something like this:If you have two or more keysyms for your keycode, X is the culprit. In that case, something like
xmodmap -e 'keycode 65 space'should work.