[library-web] mallard: fix handling of documents with emoji in titles
- From: Frederic Peters <fpeters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [library-web] mallard: fix handling of documents with emoji in titles
- Date: Sat, 9 Sep 2017 09:08:50 +0000 (UTC)
commit 6b01f84b3bea5cafc7f2e4ef339d2d0e0110a636
Author: Frédéric Péters <fpeters 0d be>
Date: Sat Sep 9 11:08:29 2017 +0200
mallard: fix handling of documents with emoji in titles
src/modtypes/mallard.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/modtypes/mallard.py b/src/modtypes/mallard.py
index 6c36137..72092ba 100644
--- a/src/modtypes/mallard.py
+++ b/src/modtypes/mallard.py
@@ -37,7 +37,7 @@ import errors
from base import DocModule
def dup_node(e):
- return ET.fromstring(ET.tostring(e))
+ return ET.fromstring(ET.tostring(e, encoding='utf-8'))
MAL_NS = 'http://projectmallard.org/1.0/'
@@ -189,7 +189,7 @@ class MallardCache:
def dump(self, filename):
tree = ET.ElementTree(self.toxml())
- tree.write(filename)
+ tree.write(filename, encoding='utf-8')
class MallardModule(DocModule):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]