Missing Pieces in Python 3 Unicode

12 thoughts
last posted March 3, 2015, 6:21 a.m.

8 earlier thoughts

0

There is also this trick, which turns environmental encoding errors into immediate exceptions rather than allowing them to enter your Python application:

import codecs
codecs.register_error('surrogateescape', codecs.strict_errors)

If you have a UTF-8 clean environment, this may not be a bad idea.

3 later thoughts