posix: always pass a native str to unicodedata.normalize's first arg
authorAugie Fackler <raf@durin42.com>
Fri, 15 Sep 2017 19:44:32 -0400
changeset 34202 d47749807464
parent 34201 310c151a0705
child 34203 3a5d8e2996f8
posix: always pass a native str to unicodedata.normalize's first arg
mercurial/posix.py
--- a/mercurial/posix.py	Fri Sep 15 19:44:05 2017 -0400
+++ b/mercurial/posix.py	Fri Sep 15 19:44:32 2017 -0400
@@ -379,7 +379,7 @@
             u = s.decode('utf-8')
 
         # Decompose then lowercase (HFS+ technote specifies lower)
-        enc = unicodedata.normalize('NFD', u).lower().encode('utf-8')
+        enc = unicodedata.normalize(r'NFD', u).lower().encode('utf-8')
         # drop HFS+ ignored characters
         return encoding.hfsignoreclean(enc)