fix(qmc): use unicode normalize to match filename #47
@ -117,6 +117,9 @@ func getDefaultMMKVDir() (string, error) {
|
|||||||
return mmkvDir, nil
|
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 {
|
func normalizeUnicode(str string) string {
|
||||||
return norm.NFC.String(str)
|
return norm.NFC.String(str)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user