On 2019-05-05, Bob Alvarez wrote:

> I want to insert text code listings into Lyx so readers can copy and
> paste from the pdf document into their plain text editor software.
>
> To replicate my problem use the example lyx file belo. Export as pdf
> (LuaTex). In the pdf select the listing text 'x-y', copy onto the
> clipboard, then paste into a text editor.
>
> My editor complains that it cannot represent some of the characters.
> The '-' character in the listing is encoded as 3f hex instead of 2d hex
> as it would be with ASCII.

This is really strange, as 2f is a question mark.

> As you can see in the example, I tried fooling around with the listings
> parameters by setting extendedchars=false but that did not help.
>
> Any suggestions as to how to fix this?

The document uses TeX fonts with LuaTeX:

> \use_non_tex_fonts false

Does using "non-TeX" fonts  in Document>Settings>Fonts help?
(This allows all Unicode characters in listings and uses Unicode-encoded
fonts in the output.)

Günter

Reply via email to