I have a Spanish character not working in 'listings' package.
In the code example below, the first occurrence of the word 'ignorará' works. The second generates the error:
! Package inputenc Error: Unicode char \u8:├\expandafter not set up for use with LaTeX.
I believe it is because I'm in the lstlisting block. How do I fix this?
\documentclass[paper=8in:10in,pagesize=pdftex,
headinclude=on,footinclude=on,12pt]{scrbook}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[spanish,english]{babel}
\usepackage{listings}
\lstset{ language=Python }
\lstloadlanguages{ Python }
\begin{document}
y el compilador lo ignorará.
\begin{lstlisting}[language=python]
# Esto es un comentario, comienza con el signo #
# y el compilador lo ignorará.
print("Esto no es un comentario, el ordenador")
print("ejecutará esto y lo imprimirá.")
\end{lstlisting}
\end{document}