Bug#413045: texlive-latex-recommended: UTF8 listings error
Frank Küster <frank@debian.org> wrote:
> Dear Brooks,
>
> a user of listings in Debian noticed that there's a small glitch when
> the file is saved in UTF-8 encoding.
Hm, Benoît has pointed out that it's more than "a small glitch"
> I think it would be a good idea to document the "extendedchars=false"
> workaround also for that, much more common, case, or make it unnecessary
> (cannot this be detected automatically?).
The problem is that the dvi file produced with extendedchares=false is
wrong. Instead of 'réseau', it prints 'érseau':
\documentclass[a4paper, 12pt]{report}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[francais]{babel}
\usepackage{listings}
\lstset{extendedchars=false}
\begin{document}
\begin{lstlisting}[language=sh, basicstyle=\ttfamily\footnotesize]
ip prefix-list FILTRE_ANNONCES_ENTRANTES seq 5 deny <réseau> le 32
\end{lstlisting}
\begin{lstlisting}[language=C++, basicstyle=\ttfamily\footnotesize]
void foo() {
// réseau
}
\end{lstlisting}
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% coding: utf-8-unix
%%% End:
The resulting dvi file is at
http://people.debian.org/~frank/413045-listings-encoding.dvi
Any idea how to fix this?
TIA, Frank
--
Dr. Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX/TeXLive)
Reply to: