gpt4 book ai didi

osx-snow-leopard - 我如何解决 : pandoc: . ..:hGetContents: invalid argument (invalid byte sequence)

转载 作者:行者123 更新时间:2023-12-04 19:15:20 25 4
gpt4 key购买 nike

我在 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)
知道如何解决这个问题吗?

最佳答案

有同样的问题我也看到这是在 Pandoc README.html 文件中:---

Pandoc uses the UTF-8 character encoding for both input and output. If your local characterencoding is not UTF-8, you should pipe input and output through iconv:

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


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

http://gnuwin32.sourceforge.net/packages/libiconv.htm Gnu Win32

https://code.google.com/p/win-iconv/ Google Win-Iconv

关于osx-snow-leopard - 我如何解决 : pandoc: . ..:hGetContents: invalid argument (invalid byte sequence),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10358508/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com