From 4b64615f92d0fa57dbe243c42ee8bba55105e0c4 Mon Sep 17 00:00:00 2001 From: Martin Zimmermann Date: Wed, 12 Nov 2014 22:34:07 +0100 Subject: [PATCH] set encoding to UTF-8 for Disqus and WordPress import, also fixes #93 --- isso/migrate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/isso/migrate.py b/isso/migrate.py index 7afd736..5afd6d0 100644 --- a/isso/migrate.py +++ b/isso/migrate.py @@ -164,7 +164,7 @@ class WordPress(object): self.xmlfile = xmlfile self.count = 0 - with io.open(xmlfile) as fp: + with io.open(xmlfile, encoding="utf-8") as fp: ns = WordPress.detect(fp.read(io.DEFAULT_BUFFER_SIZE)) if ns: @@ -257,7 +257,7 @@ def dispatch(type, db, dump): if type is None: - with io.open(dump) as fp: + with io.open(dump, encoding="utf-8") as fp: peek = fp.read(io.DEFAULT_BUFFER_SIZE) if WordPress.detect(peek):