From 93471e250ef13612ff2b5aadcf0c2083aa762cc0 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Tue, 10 Feb 2015 10:44:41 +0200 Subject: Support utf-8 input --- yarnlib/mdparser.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'yarnlib') diff --git a/yarnlib/mdparser.py b/yarnlib/mdparser.py index f787293..4bd59d3 100644 --- a/yarnlib/mdparser.py +++ b/yarnlib/mdparser.py @@ -72,5 +72,6 @@ class MarkdownParser(object): def parse_file(self, filename): # pragma: no cover with open(filename) as f: - return self.parse_string(f.read()) - + binary = f.read() + text = binary.decode('utf-8') + return self.parse_string(text) -- cgit v1.2.1