I have recently started using emacs under Windows as my python IDE. I had some struggle getting python convinced that it was allowed to output UTF-8 to my terminal emulator (
mintty does support unicode, after all) – setting
PYTHONIOENCODING=UTF-8 did the trick – but my inferior python buffer still tries to force the “charmap” encoding onto python, even though emacs can deal with unicode.
>>> Traceback (most recent call last): File "<stdin>", line 1, in <module> File "p:/My Documents/test.py", line 33, in <module> File "c:\[...]\Anaconda3\lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table) UnicodeEncodeError: 'charmap' codec can't encode character '\u03b5' in position 0: character maps to <undefined>
How do I tell emacs to tell python to just get on with it and use UTF-8?