I'm trying to generate documentation pdf file with pandoc's markdown2pdf. My source file contains some cyrillic UTF-8 symbols. My system locale is en_US.UTF-8.
When run in default locale, markdown2pdf fails to load document:
$ markdown2pdf doc.md -o doc.pdf markdown2pdf: /tmp/pandoc/doc.log: hGetContents: invalid argument (Invalid or incomplete multibyte or wide character)
If I set LANG=ru_RU.UTF-8, markdown2pdf loads document fine, launches pandoc and pandoc breaks (note different error text):
$ LANG=ru_RU.UTF-8 markdown2pdf doc.md -o doc.pdf markdown2pdf: pandoc: doc.md: hGetContents: invalid argument (Invalid or incomplete multibyte or wide character)
I do not want to change my system locale. How can I fix this issue?
System information:
$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 10.04.1 LTS Release: 10.04 Codename: lucid $ uname -a Linux localhost 2.6.32-24-generic #38-Ubuntu SMP Mon Jul 5 09:20:59 UTC 2010 x86_64 GNU/Linux $ pandoc --version pandoc 1.5.1.1