If you want to use strings with foreign characters (non-ASCII) in your Python
source file (e.g. error messages etc.), you have to add an encoding declaration
#coding=utf-8 or #-*-coding:utf-8-*- at the top of your Python
source file. Let’s take controller.py for example: