Python 2 and Python 3 handle Unicode text differently.
For the Django platform, see the Django page.
Most Compatiblity
In any Python file where you are writing unescaped Unicode characters (for example, 木 instead of \u6728), place this comment at the very beginning of the file:
# -*- coding: utf-8 -*-
When you are writing escaped Unicode charactes (for example, \u6728), place a u in front of the string’s double quotes:
message = u"\u6728\u430b"
Python 2
See more examples on the Python 2 Unicode HOWTO.
Python 3
See more examples on the Python 3 Unicode HOWTO.