Show More
@@ -208,6 +208,7 b" if sys.platform == 'darwin':" | |||||
208 | - escape-encode invalid characters |
|
208 | - escape-encode invalid characters | |
209 | - decompose to NFD |
|
209 | - decompose to NFD | |
210 | - lowercase |
|
210 | - lowercase | |
|
211 | - omit ignored characters [200c-200f, 202a-202e, 206a-206f,feff] | |||
211 |
|
212 | |||
212 | >>> normcase('UPPER') |
|
213 | >>> normcase('UPPER') | |
213 | 'upper' |
|
214 | 'upper' | |
@@ -265,7 +266,9 b" if sys.platform == 'darwin':" | |||||
265 | u = s.decode('utf-8') |
|
266 | u = s.decode('utf-8') | |
266 |
|
267 | |||
267 | # Decompose then lowercase (HFS+ technote specifies lower) |
|
268 | # Decompose then lowercase (HFS+ technote specifies lower) | |
268 |
|
|
269 | enc = unicodedata.normalize('NFD', u).lower().encode('utf-8') | |
|
270 | # drop HFS+ ignored characters | |||
|
271 | return encoding.hfsignoreclean(enc) | |||
269 |
|
272 | |||
270 | if sys.platform == 'cygwin': |
|
273 | if sys.platform == 'cygwin': | |
271 | # workaround for cygwin, in which mount point part of path is |
|
274 | # workaround for cygwin, in which mount point part of path is |
@@ -200,12 +200,11 b' case changes.' | |||||
200 | We assume anyone running the tests on a case-insensitive volume on OS |
|
200 | We assume anyone running the tests on a case-insensitive volume on OS | |
201 | X will be using HFS+. If that's not true, this test will fail. |
|
201 | X will be using HFS+. If that's not true, this test will fail. | |
202 |
|
202 | |||
203 | Bug: some codepoints are to be ignored on HFS+: |
|
|||
204 |
|
||||
205 | $ rm A |
|
203 | $ rm A | |
206 | >>> open(u'a\u200c'.encode('utf-8'), 'w').write('unicode is fun') |
|
204 | >>> open(u'a\u200c'.encode('utf-8'), 'w').write('unicode is fun') | |
207 | $ hg status |
|
205 | $ hg status | |
208 | M A |
|
206 | M A | |
209 | ? a\xe2\x80\x8c (esc) |
|
207 | ||
210 | #endif |
|
208 | #endif | |
|
209 | ||||
211 | $ cd .. |
|
210 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now