On 2012-06-10 00:27, Jürgen Spitzmüller wrote:
> 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 ę),

Thanks Jürgen for your quick reply.

As a document is in English and the only problematic letter is in my
surname the first solution seems to be the easier to adapt for me.

> (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.

I tried also the third workaround, but for listing in a Text Style menu
there are active only the bottom three positions (capitalize, uppercase
and lowercase). Dissolve Text Styles and Customized is inactive. Do I
have to do something more?

Btw, why the problem occurs only sometimes?

Regards
Marcin

Reply via email to