google-code-export / ulipad

Automatically exported from code.google.com/p/ulipad
0 stars 0 forks source link

建议更新docutils版本到0.6 #221

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
看了下Ulipad中使用的docutils还是0.4,现在最新的已经是0.6了。
对image指令
的支持,参数scale,align不能设置。

发现直接把docutils拷贝过去覆盖预览会报UnicodeError,设置下sit
ecustomize.py
添加这两句:
import sys
sys.setdefaultencoding('utf-8')

这样就解决,上述参数可以使用了

Original issue reported on code.google.com by yanc...@gmail.com on 8 Dec 2009 at 6:39

GoogleCodeExporter commented 9 years ago
I've upgrade docutils to 0.6 version, and found no errors when render rst file 
which 
including Chinese to html. So you may try the new version from svn again. 

Original comment by limo...@gmail.com on 8 Dec 2009 at 7:00

GoogleCodeExporter commented 9 years ago
Thks.But if I hadn't modified the file sitecustomize.py,it still occur these 
errors:

File "/home/wayhome/code/svn/ulipad/packages/docutils/readers/__init__.py", 
line 
80, in new_document
    document = utils.new_document(self.source.source_path, self.settings)
  File "/home/wayhome/code/svn/ulipad/packages/docutils/utils.py", line 424, in 
new_document
    source_path = decode_path(source_path)
  File "/home/wayhome/code/svn/ulipad/packages/docutils/utils.py", line 340, in 
decode_path
    path = path.decode(sys.getfilesystemencoding(), 'strict')
  File "/usr/lib/python2.6/encodings/utf_8.py", line 16, in decode
    return codecs.utf_8_decode(input, errors, True)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 43-50: 
ordinal not 
in range(128)

The last version doesn't need to modify it.
It's fit for me now,but I don't think that other people will do this way.

Original comment by yanc...@gmail.com on 8 Dec 2009 at 7:13

GoogleCodeExporter commented 9 years ago
Fixed already.

Original comment by limo...@gmail.com on 30 Dec 2009 at 8:51