I'm using OSX Yosemite on a Macbook Pro with a UK keyboard. When I type
# into a Python file (using Alt+3) I sometimes, but not always, see this syntax error when I try to run the Python file:
SyntaxError: Non-ASCII character '\xc2' in file
I can usually fix it by copying and pasting a hash character from elsewhere in the file.
I could fix it by manually setting every Python I ever work on to UTF-8 encoding:
#!/usr/bin/env python # -*- coding: utf-8 -*-
but that's not really practical when I'm working on other people's code.
Is there any way I can reset the value of this key to an ASCII-friendly
# to avoid this error?