mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-22 02:48:59 +00:00
lib/fs: Fix UnicodeLowercaseNormalized on lowercase NFD (#7692)
Co-authored-by: greatroar <@>
This commit is contained in:
parent
97437cad64
commit
0e52ce830a
@ -19,7 +19,7 @@ import (
|
||||
func UnicodeLowercaseNormalized(s string) string {
|
||||
i := firstCaseChange(s)
|
||||
if i == -1 {
|
||||
return s
|
||||
return norm.NFC.String(s)
|
||||
}
|
||||
|
||||
var rs strings.Builder
|
||||
|
@ -46,6 +46,7 @@ var caseCases = [][2]string{
|
||||
{"\u212A", "k"},
|
||||
// Folding renormalizes to NFC
|
||||
{"A\xCC\x88", "\xC3\xA4"}, // ä
|
||||
{"a\xCC\x88", "\xC3\xA4"}, // ä
|
||||
}
|
||||
|
||||
func TestUnicodeLowercaseNormalized(t *testing.T) {
|
||||
|
Loading…
Reference in New Issue
Block a user