By default, the python 2.7 on Ubuntu/Debian is using ascii as default
encoding. There is an option in /usr/lib/python2.7/site.py, user can
enable to support locale aware default string encodings, which is a
system wide setting.
The better approach is to switch the default encoding to user's setting.
Like
import locale
encoding = 'ascii'
loc = locale.getdefaultlocale()
if loc[1]:
encoding = loc[1]
sys.setdefaultencoding(encoding)
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/827090
Title:
apport-cli crashed with UnicodeEncodeError in communicate(): 'ascii'
codec can't encode characters in position 40-42: ordinal not in
range(128)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/827090/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs