From b712814fe5dcccf0d8d5bced54ac563206f3c566 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 18 Aug 2009 21:10:43 +0000 Subject: [PATCH] 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 --- pym/portage/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.26.2