mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
to normalize unicode we need to have unicode
This commit is contained in:
parent
3ed2861115
commit
6c304ebe2f
1 changed files with 2 additions and 0 deletions
|
@ -294,6 +294,8 @@ class MediaManager(object):
|
||||||
data = z.read(i)
|
data = z.read(i)
|
||||||
csum = checksum(data)
|
csum = checksum(data)
|
||||||
name = meta[i.filename]
|
name = meta[i.filename]
|
||||||
|
if not isinstance(name, unicode):
|
||||||
|
name = unicode(name, "utf8")
|
||||||
# normalize name for platform
|
# normalize name for platform
|
||||||
if isMac:
|
if isMac:
|
||||||
name = unicodedata.normalize("NFD", name)
|
name = unicodedata.normalize("NFD", name)
|
||||||
|
|
Loading…
Reference in a new issue