Skip to content

Cannot decode byte (Data.Text.Encoding: invalid UTF-8 stream) when using "--log" option #10954

@HiS-Brahms

Description

@HiS-Brahms

Explain the problem.
Pandoc fails with pandoc: Cannot decode byte '\xfc': Data.Text.Encoding: Invalid UTF-8 stream when using the "--log" option. This only happened on one specific file, based on which I produced an example (see files). This also only fails when using the "--log" option, if we dont use it, it works and produces a PDF.

example-broken.log
example-broken.md

We use the eisvogel.tex.txt template. (github doesnt like *.tex files apparently ...)

Command to reproduce:

pandoc example-broken.md -o example.pdf --from markdown --template eisvogel.tex --log=example-broken.log

Strangely, splitting the sentences up into own lines produces no error:

example-working.log
example-working.md
example-working.pdf

I also made sure that the file was indeed utf-8 (based on the documentation) with iconv -t utf-8 but it produced the same output.

It also makes no difference if the locale is en.DE-UTF-8 or en.US-UTF-8.

Pandoc version?
We can reproduce it both in

  • fedora 42 toolbox (running in latest kinoite), pandoc version 3.1.11.1
  • pandoc docker image (docker.io/pandoc/extra:latest sha256:25e2c7bdde7a637bfcc7d5f3e58bc7e65567afe46275b16f8f347df325a59a80), pandoc version 3.7.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions