From f247133ed8a9ac6e4a9dc3955611a16496b95b08 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 27 Nov 2010 13:14:16 +0900 Subject: [PATCH] make syncName work with foreign chars --- anki/deck.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/anki/deck.py b/anki/deck.py index 8a013f04b..def7bfa66 100644 --- a/anki/deck.py +++ b/anki/deck.py @@ -3111,7 +3111,7 @@ Return new path, relative to media dir.""" # and the variable is not synced def enableSyncing(self): - self.syncName = unicode(checksum(self.path)) + self.syncName = unicode(checksum(self.path.encode("utf-8"))) self.lastSync = 0 self.s.commit() @@ -3124,7 +3124,7 @@ Return new path, relative to media dir.""" return self.syncName def checkSyncHash(self): - if self.syncName and self.syncName != checksum(self.path): + if self.syncName and self.syncName != checksum(self.path.encode("utf-8")): self.notify(_("""\ Because '%s' has been moved or copied, automatic synchronisation \ has been disabled. (ERR-0100)""") % self.name())