Size: 1247
Comment:
|
Size: 1391
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
Line 29: | Line 28: |
=== Pitfalls === * ["StrIsNotAString"] * ["PrintFails"] * ["ShellRedirectionFails"] * ["UnicodeEncodeError"] * ["DefaultEncoding"] |
Resources to help you learn how to handle Unicode in your Python programs:
General Unicode Resources
[http://www.joelonsoftware.com/articles/Unicode.html The Absolute Minimum Every Software Developer Must Know about Unicode] - short intro to Unicode
Python-Specific Resources
Standard Reference
Search the Python reference for:
- unichr builtin
- string handling - example: u'Hello\u0020World !'
[http://www.python.org/doc/current/lib/module-unicodedata.html unicodedata] module
- regular expressions - see the (?u) flag, and the re.UNICODE constant
exceptions - UnicodeEncodeError
Tutorials
[http://diveintopython.org/xml_processing/unicode.html Dive Into Python: Unicode]
[http://www.egenix.com/files/python/Unicode-EPC2002-Talk.pdf Python and Unicode] (pdf talk) He also has a [http://www.reportlab.com/i18n/python_unicode_tutorial.html brief tutorial].
[http://www.jorendorff.com/articles/unicode/index.html Unicode for Programmers] - Java and Python info
[http://effbot.org/zone/unicode-objects.htm Python Unicode Objects] - brief notes
Sample Code
[http://www.intertwingly.net/blog/1581.html HTMLifying and UnHTMLifying] - see atomef.py
Pitfalls
- ["StrIsNotAString"]
["PrintFails"]
["DefaultEncoding"]