##// END OF EJS Templates
encoding: add fast-path for ASCII lowercase
Matt Mackall -
r16387:c4817610 default
parent child Browse files
Show More
@@ -168,6 +168,10 b' def getcols(s, start, c):'
168 def lower(s):
168 def lower(s):
169 "best-effort encoding-aware case-folding of local string s"
169 "best-effort encoding-aware case-folding of local string s"
170 try:
170 try:
171 return s.encode('ascii').lower()
172 except UnicodeDecodeError:
173 pass
174 try:
171 if isinstance(s, localstr):
175 if isinstance(s, localstr):
172 u = s._utf8.decode("utf-8")
176 u = s._utf8.decode("utf-8")
173 else:
177 else:
General Comments 0
You need to be logged in to leave comments. Login now