Commit f5154edc authored by Marcel van Lohuizen's avatar Marcel van Lohuizen

exp/locale/collate/tools/colcmp: fixes some discrepancies between

ICU and collate package: ICU requires strings to be in FCD form.
Not all NFC strings are in this form, leading to incorrect results.
Change to NFD instead.

R=rsc
CC=golang-dev
https://golang.org/cl/7201043
parent fc7b75f2
......@@ -279,7 +279,7 @@ func parseInput(args []string) []Input {
}
s = string(rs)
if *doNorm {
s = norm.NFC.String(s)
s = norm.NFD.String(s)
}
input = append(input, makeInputString(s))
}
......
......@@ -139,7 +139,7 @@ func (g *phraseGenerator) generate(doNorm bool) []Input {
buf16 = make([]uint16, 0, buf16Size)
}
if doNorm {
buf8 = norm.NFC.AppendString(buf8, str)
buf8 = norm.NFD.AppendString(buf8, str)
} else {
buf8 = append(buf8, str...)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment