Special characters not showing in pandoc html output

两盒软妹~` 提交于 2019-12-01 02:08:52

Try

pandoc example.md -s -o example.html

instead. The additional -s (for "stand-alone") makes pandoc insert the necessary metadata to create a full HTML file instead of just the HTML snippet that directly corresponds to the text in example.md. As part of the metadata, pandoc also generates the information that the file is UTF8 encoded. Your browser needs this piece of information to display the special characters correctly.

If you cannot use the -s flag for some reason, make sure to tell the browser about the UTF8 some other way.

Add the following to _layouts/default.html in the tag when using the summary.md and you are not able to use the -s for standalone.

 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!