Output encoding error in POSIX locale.
- Dominant language
- Haskell
- Stars
- 2.3k
- Forks
- 231
- PR merge metrics
- No merged PRs in 30d
Description
The full error message is
```
Server error: export.tex: commitBuffer: invalid argument (invalid character)
```
I'm using commit `a9e422b6ea05297dd931c606edb313be2392dcac`, built with `cabal install --prefix=/usr/local`, on an up-to-date Arch Linux installation.
The point of the error is line 245 of `Network/Gitit/Export.hs`, which reads `writeFile tempfile latex`.
A little googling led me to believe this is an output encoding issue, so I changed my system locale to `en_US.UTF-8` which rectified the problem. Nevertheless, since Pandoc assumes that all input and output is UTF-8, files written for consumption by Pandoc should always be encoded in UTF-8 regardless of the system locale.
The instigator of the problem was the euro character (Hex: e282ac) included in the default LaTeX template, located at `/usr/share/pandoc1.9.2/templates/default.latex` on my machine.
In the non-working locale, the value of `System.IO.localeEncoding` is `ANSI_X3.4-1968`. The output from `locale` reads `POSIX` for all non-empty values. In the working locale, `POSIX` is replaced by `en_US.UTF-8`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.