mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 23:42:23 -04:00
make sure we encode data as utf8 before checksumming
This commit is contained in:
parent
76988b6081
commit
ea89be5f4a
1 changed files with 2 additions and 0 deletions
|
@ -240,6 +240,8 @@ def splitFields(string):
|
|||
##############################################################################
|
||||
|
||||
def checksum(data):
|
||||
if isinstance(data, unicode):
|
||||
data = data.encode("utf-8")
|
||||
return sha1(data).hexdigest()
|
||||
|
||||
def fieldChecksum(data):
|
||||
|
|
Loading…
Reference in a new issue