summaryrefslogtreecommitdiffstats
path: root/wallace
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-02-08 13:28:16 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2013-02-08 13:28:16 +0100
commitf14545082062c204dab2504d5e51e7adb9ee1fe5 (patch)
tree28d7251d26d15758367c5d1f836a6e6ef0e962d3 /wallace
parent012c5e29572aef7747f2a4ce54b09d4b1eb79703 (diff)
downloadpykolab-f14545082062c204dab2504d5e51e7adb9ee1fe5.tar.gz
If we ensure it is stored as ascii, anything non-ascii gets written out as the ascii equivalent of the unicode character set (\u1234).
See: http://docs.python.org/2/library/json.html """ If ensure_ascii is True (the default), all non-ASCII characters in the output are escaped with \uXXXX sequences, and the result is a str instance consisting of ASCII characters only. """
Diffstat (limited to 'wallace')
-rw-r--r--wallace/__init__.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/wallace/__init__.py b/wallace/__init__.py
index 1e81eaa..56d7173 100644
--- a/wallace/__init__.py
+++ b/wallace/__init__.py
@@ -247,7 +247,9 @@ class WallaceDaemon(object):
'from': mailfrom,
'to': rcpttos,
'data': data
- }
+ },
+ ensure_ascii=True,
+ indent=4
)
(fp, filename) = tempfile.mkstemp(dir="/var/spool/pykolab/wallace/")