equal
deleted
inserted
replaced
226 ''' |
226 ''' |
227 |
227 |
228 try: |
228 try: |
229 return encoding.asciilower(path) # exception for non-ASCII |
229 return encoding.asciilower(path) # exception for non-ASCII |
230 except UnicodeDecodeError: |
230 except UnicodeDecodeError: |
231 pass |
231 return normcasefallback(path) |
|
232 |
|
233 normcasespec = encoding.normcasespecs.lower |
|
234 |
|
235 def normcasefallback(path): |
232 try: |
236 try: |
233 u = path.decode('utf-8') |
237 u = path.decode('utf-8') |
234 except UnicodeDecodeError: |
238 except UnicodeDecodeError: |
235 # OS X percent-encodes any bytes that aren't valid utf-8 |
239 # OS X percent-encodes any bytes that aren't valid utf-8 |
236 s = '' |
240 s = '' |