Home Computers Computer Languages Unicode in Python Source Code
Unicode in Python Source Code PDF Print E-mail
Written by Gordon Tillman   
Tuesday, 09 December 2008 14:34
If you want to save your Python source code files using UTF-8 encoding, just put the following at the top of your source code files. The #!... line is optional.
#!/usr/bin/env python
# -*- coding: UTF-8 -*-

Note: In Python 3.0 the default source encoding is UTF-8. See PEP 3120 for more information.

Last Updated on Tuesday, 09 December 2008 16:30