changeset 22425 | 6fd944c204a9 |
parent 21861 | b515c3a63e96 |
child 22426 | f6b533e64ed6 |
--- a/mercurial/encoding.py Fri Sep 12 19:06:11 2014 -0500 +++ b/mercurial/encoding.py Mon Sep 15 13:12:20 2014 -0500 @@ -336,8 +336,8 @@ return s._utf8 try: - if s.decode('utf-8'): - return s + s.decode('utf-8') + return s except UnicodeDecodeError: # surrogate-encode any characters that don't round-trip s2 = s.decode('utf-8', 'ignore').encode('utf-8')