From 778e9296d8c235f4530b03f3f9b25f93d6651b11 Mon Sep 17 00:00:00 2001 From: Elvish_Hunter Date: Wed, 5 Aug 2015 12:46:01 +0200 Subject: [PATCH] wmlscope: fixed files being incorrectly opened as UTF8 instead of binary --- data/tools/wmlscope | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/tools/wmlscope b/data/tools/wmlscope index 88090703873..844c8e60382 100755 --- a/data/tools/wmlscope +++ b/data/tools/wmlscope @@ -446,7 +446,7 @@ Usage: wmlscope [options] dirpath if collisions: collisions = [] for (namespace, filename) in xref.filelist.generator(): - with codecs.open(filename, "r", "utf8") as ifp: + with open(filename, "rb") as ifp: # this one may be an image or a sound, so don't assume UTF8 encoding collisions.append(hashlib.md5(ifp.read()).digest()) collisions = zip(xref.filelist.flatten(), collisions) hashcounts = {}