diff options
Diffstat (limited to 'internal/norm')
| -rw-r--r-- | internal/norm/norm.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/norm/norm.go b/internal/norm/norm.go index 77bb604..701f765 100644 --- a/internal/norm/norm.go +++ b/internal/norm/norm.go @@ -5,6 +5,7 @@ package norm import ( + "fmt" "strings" "unicode" @@ -16,6 +17,13 @@ import ( // another version are discarded (spec ยง6.1). const Version = 1 +// Fingerprint names everything Text and Name's output depends on: Version, +// and the Unicode tables of the standard library and of x/text's +// normalisation, which a Go or x/text upgrade can change (review cache F4). +func Fingerprint() string { + return fmt.Sprintf("norm%d unicode%s nfd%s", Version, unicode.Version, unorm.Version) +} + // special holds the letters that do not decompose under Unicode NFD, so // Fold maps them explicitly. var special = map[rune]string{ |
