commit: ab9392633796d671e54c2b46091beb8004441b3b
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 4 18:33:22 2018 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sun Mar 4 18:34:19 2018 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=ab939263
xattr-helper.py: use surrogateescape with python3 in unicode_encode
bin/xattr-helper.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/xattr-helper.py b/bin/xattr-helper.py
index 75844f279..49c981580 100755
--- a/bin/xattr-helper.py
+++ b/bin/xattr-helper.py
@@ -42,7 +42,7 @@ else:
def unicode_encode(s):
if isinstance(s, str):
- s = s.encode(_FS_ENCODING)
+ s = s.encode(_FS_ENCODING, 'surrogateescape')
return s