Package: python-odtwriter Version: 1.2b-1 Severity: normal As the following trascript shows, rst2html happily runs on documents that upset rst2odt. They contain non-ASCII characters like ½ and ×. I pass -o utf-8:strict to both, but the backtrace suggests that rst2odt is still using ascii for omething.
PS: I just tried adding -i utf-8:strict, too, but it didn't help. $ rst2html -o utf-8:strict x.txt x.html $ rst2odt -o utf-8:strict x.txt x.odt missing visit_contact missing depart_contact UnicodeEncodeError: 'ascii' codec can't encode character u'\u2502' in position 200: ordinal not in range(128) The specified output encoding (utf-8) cannot handle all of the output. Try setting "--output-encoding-error-handler" to * "xmlcharrefreplace" (for HTML & XML output); the output will contain "│" and should be usable. * "backslashreplace" (for other output formats, Python 2.3+); look for "\u2502" in the output. * "replace"; look for "?" in the output. "--output-encoding-error-handler" is currently set to "strict". Exiting due to error. Use "--traceback" to diagnose. If the advice above doesn't eliminate the error, please report it to <[EMAIL PROTECTED]>. Include "--traceback" output, Docutils version (0.5), Python version (2.5.2), your OS type & version, and the command line used. $ rst2odt --traceback -o utf-8:strict x.txt x.odt missing visit_contact missing depart_contact Traceback (most recent call last): File "/usr/bin/rst2odt", line 81, in <module> output = publish_cmdline_to_binary(writer=writer, description=description) File "/usr/bin/rst2odt", line 76, in publish_cmdline_to_binary config_section=config_section, enable_exit_status=enable_exit_status) File "/usr/lib/python2.5/site-packages/docutils/core.py", line 206, in publish output = self.writer.write(self.document, self.destination) File "/usr/lib/python2.5/site-packages/docutils/writers/__init__.py", line 76, in write self.translate() File "/usr/lib/python2.5/site-packages/docutils/writers/odtwriter/__init__.py", line 674, in translate self.document.walkabout(self.visitor) File "/usr/lib/python2.5/site-packages/docutils/nodes.py", line 176, in walkabout if child.walkabout(visitor): File "/usr/lib/python2.5/site-packages/docutils/nodes.py", line 168, in walkabout visitor.dispatch_visit(self) File "/usr/lib/python2.5/site-packages/docutils/writers/odtwriter/__init__.py", line 1135, in dispatch_visit nodes.GenericNodeVisitor.dispatch_visit(self, node) File "/usr/lib/python2.5/site-packages/docutils/nodes.py", line 1540, in dispatch_visit return method(node) File "/usr/lib/python2.5/site-packages/docutils/writers/odtwriter/__init__.py", line 1992, in visit_literal_block el1 = etree.fromstring(s1) File "/usr/lib/python2.5/xml/etree/ElementTree.py", line 963, in XML parser.feed(text) File "/usr/lib/python2.5/xml/etree/ElementTree.py", line 1245, in feed self._parser.Parse(data, 0) UnicodeEncodeError: 'ascii' codec can't encode character u'\u2502' in position 200: ordinal not in range(128) $ locale LANG=en_AU.UTF-8 LC_CTYPE="en_AU.UTF-8" LC_NUMERIC="en_AU.UTF-8" LC_TIME="en_AU.UTF-8" LC_COLLATE=C LC_MONETARY="en_AU.UTF-8" LC_MESSAGES="en_AU.UTF-8" LC_PAPER="en_AU.UTF-8" LC_NAME="en_AU.UTF-8" LC_ADDRESS="en_AU.UTF-8" LC_TELEPHONE="en_AU.UTF-8" LC_MEASUREMENT="en_AU.UTF-8" LC_IDENTIFICATION="en_AU.UTF-8" LC_ALL= -- System Information: Debian Release: lenny/sid APT prefers testing APT policy: (990, 'testing') Architecture: i386 (i686) Kernel: Linux 2.6.25-2-686 (SMP w/1 CPU core) Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages python-odtwriter depends on: ii python 2.5.2-1 An interactive high-level object-o ii python-central 0.6.7 register and build utility for Pyt ii python-docutils 0.4-6 Utilities for the documentation of Versions of packages python-odtwriter recommends: pn python-imaging <none> (no description available) pn python-pygments <none> (no description available) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]