ruanimal / nfs4j-daemon

Pure Java NFS v3/v4.1 server backed by dCache nfs4j

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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: