From: Fredrik Tolf Date: Thu, 19 Sep 2013 01:21:32 +0000 (+0200) Subject: Merge branch 'master' into python3 X-Git-Url: http://dolda2000.com/gitweb/?a=commitdiff_plain;h=784495582d53f5b759dd216ddd1268fbe2479bb9;hp=11c9628ee0bad3e74e60b040986edc59465f4675;p=wrw.git Merge branch 'master' into python3 Conflicts: wrw/sp/cons.py --- diff --git a/wrw/sp/cons.py b/wrw/sp/cons.py index 205de03..cb9d451 100644 --- a/wrw/sp/cons.py +++ b/wrw/sp/cons.py @@ -1,3 +1,4 @@ +import sys import xml.dom.minidom class node(object): @@ -39,9 +40,11 @@ class element(node): return self.__todom__(doc).toxml() class context(object): + charset = sys.getfilesystemencoding() + def __init__(self): self.nodeconv = {} - self.nodeconv[bytes] = lambda ob: text(ob, "utf-8") + self.nodeconv[bytes] = lambda ob: text(ob, self.charset) self.nodeconv[str] = text self.nodeconv[int] = text self.nodeconv[float] = text