From fec62da2886e29aa0a9233e13fd9cae0ca6076bf Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Tue, 8 Mar 2011 13:07:08 +0100 Subject: [PATCH] encode unicode for lxml --- librarian/parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/librarian/parser.py b/librarian/parser.py index 4cdaa79..afc4f1a 100644 --- a/librarian/parser.py +++ b/librarian/parser.py @@ -61,7 +61,7 @@ class WLDocument(object): try: parser = etree.XMLParser(remove_blank_text=False) - tree = etree.parse(StringIO(data), parser) + tree = etree.parse(StringIO(data.encode('utf-8')), parser) if swap_endlines: cls.swap_endlines(tree) -- 2.20.1