This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ronaldoussoren
Recipients ezio.melotti, hidr0.frbg, ronaldoussoren, steven.daprano, vstinner
Date 2020-12-12.10:14:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1607768086.74.0.255603615607.issue42614@roundup.psfhosted.org>
In-reply-to
Content
What filesystem is used on macOS? If it is HFS+ you're likely running into unicode normalisation in the filesystem.

That is, 'й' can be represented as a single unicode codepoint (and likely is in your script), but in the NFD normalisation used by HFS+ the same character is represented using two codepoints (one of which is a combining character). Python string comparison compares code points and is not normalisation aware.

For APFS (used by default in recent macOS versions) the situation is more complicated according to what I've found on Google. However, APFS doesn't seen to normalise names (I've created a file name 'й' and os.listdir() returns a name with a single codepoint).
History
Date User Action Args
2020-12-12 10:14:46ronaldoussorensetrecipients: + ronaldoussoren, vstinner, ezio.melotti, steven.daprano, hidr0.frbg
2020-12-12 10:14:46ronaldoussorensetmessageid: <1607768086.74.0.255603615607.issue42614@roundup.psfhosted.org>
2020-12-12 10:14:46ronaldoussorenlinkissue42614 messages
2020-12-12 10:14:46ronaldoussorencreate