character encoding - How can I type a single quote on the Raspberry Pi that doesn't cause syntax errors in Python? -


i have logitech 360 keyboard, trying code python on raspberry pi b. apostrophe key produces slanted quote, instead of 'vertical' single quote, , causes syntax errors in code (the same code runs when paste in snippet browser, way can find produce correct flavor of apostrophe).

the syntax error "non-ascii character '\xc2' in file '---' on line x, no encoding declared; see http://www.python.org/peps/pep-0263.html details." webpage suggests declaring character encoding @ beginning of script, didn't work me, , in case, rather not have have @ beginning of every script - want keyboard produce correct character begin with. have fiddled keyboard config international settings; nothing works. it's driving me nuts.

you cannot use "\xc2" quote character without redefining quote character in python source grammar(really problems extend beyond this) , recompiling python ....

you can change character logitech uses quote