jclement / SublimePandoc

Sublime Text 2 Plugin for the Pandoc Markdown Renderer
34 stars 12 forks source link

a little mod to deal with chinese file #2

Open mmyjona opened 12 years ago

mmyjona commented 12 years ago

when I use this plugin to convert pandoc file including Chinese Chars.

Traceback (most recent call last): File ".\sublimeplugin.py", line 356, in run File ".\PandocRender.py", line 37, in run UnicodeEncodeError: 'ascii' codec can't encode characters in position 7-16: ordinal not in range(128)

I moded PandocRender.py line 37 from

tmp_md.write(contents)

to

tmp_md.write(contents.encode(encoding))

then html conversion is fixed.

andxyz commented 12 years ago

fixed my conversion issue too when using umlauts and such. thanks for posting this mmyjona.

benignoc commented 12 years ago

Worked for me too, thank you mmyjona.