fix(qmc): use unicode normalize to match filename #47

Merged
um-dev merged 3 commits from fix/unicode-norm into master 2022-12-05 03:24:40 +00:00
1 changed files with 3 additions and 0 deletions
Showing only changes of commit 12be881d42 - Show all commits

View File

@ -117,6 +117,9 @@ func getDefaultMMKVDir() (string, error) {
return mmkvDir, nil
}
// normalizeUnicode normalizes unicode string to NFC.
// since macOS may change some characters in the file name.
// e.g. "ぜ"(e3 81 9c) -> "ぜ"(e3 81 9b e3 82 99)
func normalizeUnicode(str string) string {
return norm.NFC.String(str)
}