MCPcopy
hub / github.com/rclone/rclone / detectEncoding

Function detectEncoding

cmd/convmv/convmv_test.go:242–253  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

240}
241
242func detectEncoding(s string) string {
243 if norm.NFC.IsNormalString(s) && norm.NFD.IsNormalString(s) {
244 return "BOTH"
245 }
246 if !norm.NFC.IsNormalString(s) && norm.NFD.IsNormalString(s) {
247 return "NFD"
248 }
249 if norm.NFC.IsNormalString(s) && !norm.NFD.IsNormalString(s) {
250 return "NFC"
251 }
252 return "OTHER"
253}
254
255func TestUnicodeEquivalence(t *testing.T) {
256 r := fstest.NewRun(t)

Callers 1

compareNamesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…