summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-08-18 21:10:43 +0000
committerZac Medico <zmedico@gentoo.org>2009-08-18 21:10:43 +0000
commitb712814fe5dcccf0d8d5bced54ac563206f3c566 (patch)
tree81aa3f6aba799059a9b8cde957e5350918ccad70
parent4a68aff462b82f5d3048b77fa559155e9343077d (diff)
downloadportage-b712814fe5dcccf0d8d5bced54ac563206f3c566.tar.gz
portage-b712814fe5dcccf0d8d5bced54ac563206f3c566.tar.bz2
portage-b712814fe5dcccf0d8d5bced54ac563206f3c566.zip
Use errors='backslashreplace' instead of 'replace' for the default
_unicode_encode() argument ('replace' substitutes '?', which is not as useful). svn path=/main/trunk/; revision=14092
-rw-r--r--pym/portage/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index c8100b396..480e00f81 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -131,7 +131,8 @@ _content_encoding = _encodings['content']
_fs_encoding = _encodings['fs']
_merge_encoding = _encodings['merge']
-def _unicode_encode(s, encoding=_encodings['content'], errors='replace'):
+def _unicode_encode(s, encoding=_encodings['content'],
+ errors='backslashreplace'):
if isinstance(s, unicode):
s = s.encode(encoding, errors)
return s