encoding - pandoc:无法解码字节 '\xd0':Data.Text.Encoding.Fusion.streamUtf8:无效的 UTF-8 流

标签 encoding utf-8 pdf-generation pandoc

我在执行 pandoc --filter pandoc-citeproc myfile.markdown myfile.pdf

时遇到此错误

pandoc: Cannot decode byte '\xd0': Data.Text.Encoding.Fusion.streamUtf8: Invalid UTF-8 stream

我搜索过herehere ,但我已经从文本编辑器中仔细检查过,我的文件是 UTF-8 编码的。它带有重音西类牙字符,但相同的命令在过去没有任何问题。任何指向解决方案的指示将不胜感激。

最佳答案

我的错。该问题与我用来告诉 pandoc 创建 pdf 输出的命令有关。正确的命令应该是:

pandoc --filter pandoc-citeproc myfile.markdown -o myfile.pdf

注意输入 Markdown 文件和输出 pdf 文件之间的 -o 标志。这就是为什么我收到了与我的链接中记录的那些试图将 pdf 转换为其他格式的人相同的 utf-8 消息。

关于encoding - pandoc:无法解码字节 '\xd0':Data.Text.Encoding.Fusion.streamUtf8:无效的 UTF-8 流,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21560520/

相关文章:

php - 在 PHP 中转换 Base64 编码的制表符分隔文件

javascript - Wicked PDF - 等待 AJAX 请求完成

c++ - Qt 应用程序不打印 ěčř

file - 对文件、文件编码、文件格式有清晰的认识

ruby-on-rails - Rails 使用 UTF-8 呈现 JSON 响应

csv - 如何在 Google 文档电子表格中用双引号括起每个单元格

.net - 使用PowerShell将文件上传到FTP,文件名在GB2312中,而不是UTF-8

c++ - 运行时检查失败 #2 MSVC 仅使用 utf8proc 进行调试

c# - System.DllNotFoundException : 'Unable to load DLL ' libwkhtmltox': The specified module could not be found.(HRESULT 异常:0x8007007E)'

asp.net - 如何使用 iTextSharp?