summaryrefslogtreecommitdiff
path: root/docutils
diff options
context:
space:
mode:
authorwiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2007-03-21 02:43:26 +0000
committerwiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04>2007-03-21 02:43:26 +0000
commit03bf7675814fdd2228856bc7958509933bb5f4a8 (patch)
tree99a9f772a333b4831472143ea4dd1f3bdd7b8a3a /docutils
parentcc347c24a646cb44006de07319ccf798d381b860 (diff)
downloaddocutils-03bf7675814fdd2228856bc7958509933bb5f4a8.tar.gz
replaced 'raw_unicode_escape' with 'ascii', 'backslashreplace' so we don't get latin1 strings
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@5032 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils')
-rw-r--r--docutils/core.py2
-rw-r--r--docutils/nodes.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/docutils/core.py b/docutils/core.py
index f68f74cea..82547f386 100644
--- a/docutils/core.py
+++ b/docutils/core.py
@@ -245,7 +245,7 @@ class Publisher:
if self.settings.dump_pseudo_xml:
print >>sys.stderr, '\n::: Pseudo-XML:'
print >>sys.stderr, self.document.pformat().encode(
- 'raw_unicode_escape')
+ 'ascii', 'backslashreplace')
def report_Exception(self, error):
if isinstance(error, utils.SystemMessage):
diff --git a/docutils/nodes.py b/docutils/nodes.py
index ffb679b17..7d1fbc4da 100644
--- a/docutils/nodes.py
+++ b/docutils/nodes.py
@@ -62,7 +62,7 @@ class Node:
return 1
def __str__(self):
- return self.__unicode__().encode('raw_unicode_escape')
+ return self.__unicode__().encode('ascii', 'backslashreplace')
def __unicode__(self):
# Override in subclass.