2012/6/9 Marcin Zajączkowski:
> I spotted that the problem occurs only when there is a Polish national
> character in a document header (e.g. \rhead{\bfseries ę}). I don't know
> why this is a problem. I have set UTF8 encoding in a document. Problem
> reproducible with Lyx 2.0.3 and a following document:
> http://timeoff.wsisiz.edu.pl/tmp/mla/problem-with-inputenc-and-listings.lyx

The problem results from the fact that LyX has to switch to latin9
(the default encoding of your document's main language, English) for
listings (since listings does not support unicode), and this latin9
encoding is active when your header is written. Workarounds: (1) Use
macros for non-latin9 chars in the header (i.e., \k{e} instead of ę),
(2) set the document language to Polish (given the document is in
Polish, of course) or (3) select the listing and change the language
in Edit > Text Style to Polish just for the listing. (2) and (3) will
cause the switch to be to latin2.

HTH
Jürgen

Reply via email to