From: david-sarah Date: Thu, 17 Jun 2010 04:14:11 +0000 (-0700) Subject: dirnode.py: comments about normalization changes. X-Git-Tag: trac-4500~8 X-Git-Url: https://git.rkrishnan.org/components/com_hotproperty/reliability?a=commitdiff_plain;h=718870a796151e848ed912ac616b9a280a1b7246;p=tahoe-lafs%2Ftahoe-lafs.git dirnode.py: comments about normalization changes. --- diff --git a/src/allmydata/dirnode.py b/src/allmydata/dirnode.py index 2ae819e7..53aaddde 100644 --- a/src/allmydata/dirnode.py +++ b/src/allmydata/dirnode.py @@ -76,6 +76,10 @@ def update_metadata(metadata, new_metadata, now): return metadata + +# 'x' at the end of a variable name indicates that it holds a Unicode string that may not +# be NFC-normalized. + def normalize(namex): return unicodedata.normalize('NFC', namex) @@ -325,8 +329,9 @@ class DirectoryNode: raise ValueError("the rwcapdata field of a dirnode in an immutable directory was not empty") # A name containing characters that are unassigned in one version of Unicode might - # not be normalized wrt a later version. Therefore we normalize names going both in - # and out of directories. + # not be normalized wrt a later version. See the note in section 'Normalization Stability' + # at . + # Therefore we normalize names going both in and out of directories. name = normalize(namex_utf8.decode("utf-8")) rw_uri = ""