E.g. the patch below (which causes python-shell-send-string to tell
Python that the file sent is using utf-8) should fix your problem (tho
it's not a proper fix, since we shouldn't hardcode utf-8 here, but copy
which ever -*- coding: -*- coding is in the file).
I installed a variant of that patch in Emacs's trunk, which should fix
the problem. The relevant part of the patch is quoted below, so you can
try it out,
Stefan
=== modified file 'lisp/progmodes/python.el'
--- lisp/progmodes/python.el 2013-10-07 18:51:26 +0000
+++ lisp/progmodes/python.el 2013-10-30 01:28:36 +0000
@@ -2045,7 +2051,9 @@
(concat (file-remote-p default-directory) "/tmp")
temporary-file-directory))
(temp-file-name (make-temp-file "py"))
+ (coding-system-for-write 'utf-8)
(file-name (or (buffer-file-name) temp-file-name)))
(with-temp-file temp-file-name
+ (insert "# -*- coding: utf-8 -*-\n")
(insert string)
(delete-trailing-whitespace))