Writing Unicode Characters in Python source code

Python is so incredible smart, it understands both Emacs and VIM hints about source code encoding. E.g. putting this in the beginning of the file will make both Emacs and the Python interpreter able to properly display, save, byte compile and run the Python program:

# -*- coding: utf-8-unix -*-

There's a corresponding setting for VIM as well as a non-editor related one, check out PEP-0263 for more information.

Licensed under CC BY Creative Commons License ~ ✉ torstein.k.johansen @ gmail ~ 🐘 @skybert@emacs.ch ~ 🐦 @torsteinkrause