Ronny Lam


Odd Behavior With Quotes on US International Keyboard

I am writing this post on a Chromebook using NaCl SSH to my Raspberry Pi. I do this most of the time and it works great, however, some weeks ago the behavior changed. Somehow my quotes, both single and double, would not be accepted anymore by the shell.

pi@raspberrypi ~ $ echo "hello world"
hello world
pi@raspberrypi ~ $ echo ¨hello world¨
¨hello world¨

In this example the first echo displays the expected behavior. The quotes are interpreted by the shell and cuts them of when displaying the string. The second echo is where things go wrong. The quotes are not interpreted by the shell and are thus seen as part of the string.

It took me a couple of weeks, first irritation and then investigation, to find out what was going on. I am using US International keyboard on my Chromebook. And some weeks ago Google decided it was a good thing to introduce smart-quotes to that keyboard. They replace the dumb quotes with nice 66 and 99 quotes, which are not working in a shell. Switching to the Dutch keyboard didn’t work out either. But then I found this post which pointed me in the right direction. The US US keyboard does not use the smart-quotes and this is thus the best keyboard in a terminal.

Thanks Ben!