我该如何解决:pandoc:...:hGetContents:无效的参数(无效的字节序列)

rev*_*rev 5 osx-snow-leopard pandoc

我在Mac OSX 10.6.8的终端中运行以下代码:

find . -name \*.html -type f -exec pandoc -o {}.md {} \;

它解析了一些文档,但是在很多情况下给了我这个错误:

pandoc: ./Teaching/how_16825_make-lesson-book.html: hGetContents: invalid argument (invalid byte sequence)

任何想法如何解决这个问题?

小智 0

当我尝试解析以 latin-1 编码的文件时,出现此错误。

出现此错误时,请在使用 pandoc 之前尝试将文件保存为 utf-8(并修改 html 代码中的字符集声明)。