How to set UTF8 in a lstlisting? (Error received)
I just solved it in using
inputencoding=latin1
I hope it can help some in the same case than me.
listings cannot handle UTF8-characters. Search in the docs for the keyword literate
. Then you'll see how UTF-8 characters can be mapped to TeX commands, eg
ü->\"u
: \lstset{literate={ü}{{\"u}}1}
I solved adding texcl=true
to the \lstset
configuration.