Open xmfbit opened 6 years ago
Just a comment on this. I believe notedown uses pandoc for conversion. I have used pandoc a bit for markdown to pdf conversion and there are some extra things you need to set to to do it, for one I needed to use the LuaTeX engine to get this to work, I'm not sure if notedown supports this. For what's worth this is my configuration for using pandoc with Chinese characters. Perhaps it will give some hints for addressing this issue:
title: Test
author:
documentclass:
abstract: This is a pandoc test . . .
你好吗?
To process this with Pandoc on the command line simply type:
pandoc -s chinese-input.md --latex-engine=lualatex -o output-file.pdf
@babycamel Thanks for your comment! However, I believe that LuaTex engine is for md-> pdf conversion, not for notebook -> md conversion. Anyway, thanks!
Correct but notedown uses pandoc and knitr for notebook -> md, it sets the encoding to utf-8 which I think you need. knitr handles Chinese without difficulty, so I suspect the problem is with pandoc attributes. I could be wrong though.
Thanks! I currently don't have motivation to solve this problem. Maybe I will try the solution afterwards. 🤕
When I tried to convert a jupyter notebook which contained Chinese characters, UnicodeEncoderError occurs like this: I have tried to install
notedown
using the two methods provided inREADME
: pre-compiled package and lastest from github. And Python 2.7/3.6 are tested. Tested on Mac OS and Ubuntu16.04.