Unrecognized character \xC2
Tuesday, December 7, 2010 12:52:35 AM
It's a pain in the ass, as AltGr+Space inserts a non-breakable space which is not valid in various programming languages, like perl, but still not visible to the eye.
nicolasm@akiko:~$ perl -wle 'my $a = { };'
Unrecognized character \xC2 in column 10 at -e line 1.
nicolasm@akiko:~$ echo "perl -wle 'my $a = { };'" | hd
00000000 70 65 72 6c 20 2d 77 6c 65 20 27 6d 79 20 20 3d |perl -wle 'my =|
00000010 20 7b c2 a0 7d 3b 27 0a | {..};'.|
00000018
Notice the c2 a0 combo between the curly brackets!
After ages of annoyance I finally found the solution via: http://lostwebsite.wordpress.com/2008/10/27/annoying-non-breakable-spaces-in-bashzsh/
In Ubuntu you can fix this by going to: Settings -> Keyboard -> Layout -> Alternatives, and select "Using space key to input non-breakable space character" and set it to: "Usual space at any level"
or to quickly fix it:
setxkbmap -option "nbsp:none"in a shell
For Gnome3 (and Unity?): simply type "region" <Enter> in the command input and choose the same option.
PROFIT!













