odfwriter fails when using a config file with non ascii names
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-docutils (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
When using the odfwriter (rst2odt) --odf-config-file option to map style names to custom names, and when these names have non-ascii characters in them, the writer fails with an UnicodeDecodeError exception.
The following command generates a traceback and the same command works fine if the rst2odtstyles.ini file is changed so no non-ascii chars appear in it.
$ rst2odt --traceback --stylesheet=
Traceback (most recent call last):
File "/usr/bin/rst2odt", line 29, in <module>
description
File "/usr/lib/
config_
File "/usr/lib/
output = self.writer.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
content = self.visitor.
File "/usr/lib/
return self.astext()
File "/usr/lib/
s1 = ToString(et)
File "/usr/lib/
et.
File "/usr/lib/
serialize(
File "/usr/lib/
_serialize_
File "/usr/lib/
_serialize_
File "/usr/lib/
_serialize_
File "/usr/lib/
v = _escape_attrib(v, encoding)
File "/usr/lib/
return text.encode(
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 17: ordinal not in range(128)
I forwarded the bug upstream: sourceforge. net/tracker/ ?group_ id=38414& atid=422030
http://