SublimePandoc icon indicating copy to clipboard operation
SublimePandoc copied to clipboard

a little mod to deal with chinese file

Open mmyjona opened this issue 13 years ago • 2 comments

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

Traceback (most recent call last): File ".\sublime_plugin.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.

mmyjona avatar Apr 17 '12 09:04 mmyjona

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

andxyz avatar May 25 '12 05:05 andxyz

Worked for me too, thank you mmyjona.

benignoc avatar Jun 27 '12 07:06 benignoc