Congrats on this nice tool!
While I try to convert a rest file to latex, I encoutered the following
error:
Docutils version (0.3.1),
Python version (2.3.2)
OS: Linux debian 2.4.22
locale: zh_CN.gbk
root@debian:~# rest2latex b2.rst
'latin-1' codec can't encode characters in position 1656-1657: ordinal
not in range(256)
Exiting due to error. Use "--traceback" to diagnose.
root@debian:~# rest2latex --traceback b2.rst
Traceback (most recent call last):
File "/usr/bin/rest2latex", line 25, in ?
publish_cmdline(writer_name='latex', description=description)
File "/usr/lib/site-python/docutils/core.py", line 267, in
publish_cmdline
config_section=config_section, enable_exit=enable_exit)
File "/usr/lib/site-python/docutils/core.py", line 182, in publish
output = self.writer.write(document, self.destination)
File "/usr/lib/site-python/docutils/writers/__init__.py", line 53, in
write
output = self.destination.write(self.output)
File "/usr/lib/site-python/docutils/io.py", line 233, in write
output = self.encode(data)
File "/usr/lib/site-python/docutils/io.py", line 127, in encode
return data.encode(self.encoding, self.error_handler)
UnicodeEncodeError: 'latin-1' codec can't encode characters in position
1656-1657: ordinal not in range(256)
I think it's not handling Chinese characters properly, by the way, I
have installed python2.3-cjkcodecs package, maybe it's just a simple
matter of adding a check of the locale and the presence of cjkcodecs?
Thanks in advance,
Joseph H. Yao
|