Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/jenkins/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Osx snow leopard 如何求解:pandoc:…:hGetContents:无效参数(无效字节序列)_Osx Snow Leopard_Pandoc - Fatal编程技术网

Osx snow leopard 如何求解:pandoc:…:hGetContents:无效参数(无效字节序列)

Osx snow leopard 如何求解:pandoc:…:hGetContents:无效参数(无效字节序列),osx-snow-leopard,pandoc,Osx Snow Leopard,Pandoc,我正在Mac OSX 10.6.8上的终端中运行以下代码: find-name\*.html-type f-exec pandoc-o{}.md{} 它解析了一些文档,但在许多文档中出现了此错误: pandoc:./Teaching/how\u make-lesson-book.html:hGetContents:无效参数(无效字节序列) 知道如何解决这个问题吗?当我试图解析一个用拉丁语1编码的文件时,我遇到了这个错误 出现此错误时,请在使用pandoc之前尝试将文件保存在utf-8中(并在ht

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

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

它解析了一些文档,但在许多文档中出现了此错误:

pandoc:./Teaching/how\u make-lesson-book.html:hGetContents:无效参数(无效字节序列)


知道如何解决这个问题吗?

当我试图解析一个用拉丁语1编码的文件时,我遇到了这个错误


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

正如kadeix所说,这是一个字符编码问题。修改html中的字符集声明对我没有任何帮助


为了解决这个问题,我在vim中使用了:
:w++enc=utf-8

有相同的问题,我还看到它在Pandoc README.html文件中:---

Pandoc对输入和输出都使用UTF-8字符编码。如果你是本地人 编码不是UTF-8,您应该通过iconv进行管道输入和输出:

iconv-t utf-8 input.txt | pandoc | iconv-f utf-8

当然,您可能需要先安装iconv(我相信MacOSX已经安装了它)

Gnu Win32

谷歌赢Iconv