diff options
| author | wiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2004-07-24 18:35:09 +0000 |
|---|---|---|
| committer | wiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2004-07-24 18:35:09 +0000 |
| commit | 253d5324a1754ddda972807b0e2ff6303c3dbef4 (patch) | |
| tree | 224d4ac759a50ab5f1bb49eb4e760d6bfcd222e7 /docutils | |
| parent | 2bc818421e920944dce0b893e824c2ddb0430fea (diff) | |
| download | docutils-253d5324a1754ddda972807b0e2ff6303c3dbef4.tar.gz | |
xmlcharrefreplace backport
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@2448 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils')
| -rw-r--r-- | docutils/core.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/docutils/core.py b/docutils/core.py index 846041f32..17b8ddd7f 100644 --- a/docutils/core.py +++ b/docutils/core.py @@ -245,23 +245,23 @@ command line used.""" % (__version__, sys.version.split()[0])) def report_UnicodeError(self, error): print >>sys.stderr, '%s: %s' % (error.__class__.__name__, error) - print >>sys.stderr, (""" + print >>sys.stderr, """ The specified output encoding (%s) cannot handle all of the output. Try setting "--output-encoding-error-handler" to -""" % (self.settings.output_encoding)), + +* "xmlcharrefreplace" (for HTML & XML output);""" if sys.hexversion >= 0x02030000: # Python 2.3 - print >>sys.stderr, (""" -* "xmlcharrefreplace" (for HTML & XML output, Python 2.3+); + print >>sys.stderr, """\ the output will contain "%s" and should be usable. * "backslashreplace" (for other output formats, Python 2.3+); - look for "%s" in the output. -*""" % (error.object[error.start:error.end].encode('ascii', - 'xmlcharrefreplace'), - error.object[error.start:error.end].encode('ascii', - 'backslashreplace'))), + look for "%s" in the output.""" % ( + error.object[error.start:error.end].encode('ascii', 'xmlcharrefreplace'), + error.object[error.start:error.end].encode('ascii', 'backslashreplace')) + else: + print >>sys.stderr, ' the output should be usable as-is.' print >>sys.stderr, ("""\ -"replace" (Python 2.1 or 2.2); look for "?" in the output. +* "replace"; look for "?" in the output. "--output-encoding-error-handler" is currently set to "%s". |
