From 718870a796151e848ed912ac616b9a280a1b7246 Mon Sep 17 00:00:00 2001 From: david-sarah Date: Wed, 16 Jun 2010 21:14:11 -0700 Subject: [PATCH] dirnode.py: comments about normalization changes. --- src/allmydata/dirnode.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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 = "" -- 2.45.2