Mercurial > hg
comparison mercurial/posix.py @ 34202:d47749807464
posix: always pass a native str to unicodedata.normalize's first arg
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Fri, 15 Sep 2017 19:44:32 -0400 |
parents | 310c151a0705 |
children | ab687e06fe02 |
comparison
equal
deleted
inserted
replaced
34201:310c151a0705 | 34202:d47749807464 |
---|---|
377 s += c | 377 s += c |
378 | 378 |
379 u = s.decode('utf-8') | 379 u = s.decode('utf-8') |
380 | 380 |
381 # Decompose then lowercase (HFS+ technote specifies lower) | 381 # Decompose then lowercase (HFS+ technote specifies lower) |
382 enc = unicodedata.normalize('NFD', u).lower().encode('utf-8') | 382 enc = unicodedata.normalize(r'NFD', u).lower().encode('utf-8') |
383 # drop HFS+ ignored characters | 383 # drop HFS+ ignored characters |
384 return encoding.hfsignoreclean(enc) | 384 return encoding.hfsignoreclean(enc) |
385 | 385 |
386 if pycompat.sysplatform == 'cygwin': | 386 if pycompat.sysplatform == 'cygwin': |
387 # workaround for cygwin, in which mount point part of path is | 387 # workaround for cygwin, in which mount point part of path is |