From 24dd025cc37ef887a5f4322c9e3bc98c589137e9 Mon Sep 17 00:00:00 2001 From: kounch Date: Mon, 15 May 2017 09:49:53 +0200 Subject: [PATCH] Suppor for non-ASCII characters in filenames MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a filename has characters like ñ or Á, an encoding exception is thrown (e.g. UnicodeEncodeError: 'ascii' codec can't encode character...) This fixes it. --- mylar/helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mylar/helpers.py b/mylar/helpers.py index afaee16e..4d9da9aa 100755 --- a/mylar/helpers.py +++ b/mylar/helpers.py @@ -2273,7 +2273,7 @@ def crc(filename): #speed in lieu of memory (file into memory entirely) #return "%X" % (zlib.crc32(open(filename, "rb").read()) & 0xFFFFFFFF) - + filename = filename.encode(mylar.SYS_ENCODING) return hashlib.md5(filename).hexdigest() def issue_find_ids(ComicName, ComicID, pack, IssueNumber):