LOOKUP bug when filename contains NFC(Normalization Form C) characters
ruanimal opened this issue · comments
It looks like macOS client transform all NFC characters to NFD, this cause NFS3ERR_NOENT represented by NoEntException if filename contains NFC.
>>> import json, unicodedata
>>> print(json.dumps('ぶ'))
"\u3076"
>>> print(json.dumps(unicodedata.normalize('NFD', 'ぶ')))
"\u3075\u3099"
>>> unicodedata.normalize('NFD', 'ぶ')
'ぶ'
>>> 'ぶ' == 'ぶ'
False
ref:
see also
https://www.reddit.com/r/DataHoarder/comments/ffqnra/making_smbnfsafp_shares_unicode_normalisation/
https://www.truenas.com/docs/scale/scaletutorials/shares/smb/smbusingdecomposedunicode/
https://geraldonit.com/2020/02/08/apple-afp-to-smb-migration-removing-appledouble-and-_-files-and-converting-file-names-from-unicode-nfd-to-nfc/