Closed Kuszki closed 4 months ago
Sorry for the delay, I did as you suggested: it will use the encoding, if set explicitly with --encoding option, and the locale encoding otherwise. It will not use the encoding guessed from reading the input latex files, though, as in the current flow the preamble file is read before the encoding is guessed.
Selecting custom preamble file via
--preabmle=file
causes the file is open in raw mode thus all non-ascii characters are broken in output file.Please add support to
-e | --encoding
so it can set encoding for preamble file or just use locale-default encoding for it.How to reproduce:
1) Create UTF-8 coded preamble file, then use any non-ascii character in this file 2) Call
latexdiff
with--preabmle=file
3) Output contains bad charactershttps://github.com/ftilmann/latexdiff/blob/1f9d07fd1b6edd914804442de0b396264311df8b/latexdiff#L1879C7-L1879C11