On 2013-03-24, Georg Baum wrote: > Scott Kostyshak wrote: >> Thanks for the explanation. If I understand correctly then, >> DocumentTexteBidon.txt should have latin9 encoding when compiling with >> latex/pdflatex and should have utf8 encoding when compiling with >> xetex/luatex and thus it is impossible to have both (unless we have >> the LyX converter change the encoding) ?
> Yes. We should mention this in the documentation: verbatiminput requires the same encoding as the main document (or pure ASCII). This is a problem for any LaTeX output format if we change the "latex encoding" in Document>Settings>Fonts. We could change Document>Settings>Fonts>LaTeX encoding to utf8 and convert the embedded file, so that both, 8-bit engines and Xe/LuaTeX use the same encoding. >> I'm not sure what to do then. When I change the encoding to utf8, >> latex/pdflatex do not complain, which leads me to think it's OK for >> all of them. If you only recode the embedded file but leave the LaTeX encoding, the output schould differ (compare the PDF representation of the included file in the versions generated with pdflatex and lualatex, I expect, all high-bit characters will be represented by two garbage letters.) OTOH, changing both the embedded file encoding and the "LaTeX encoding" to utf8 should be safe as long as you do not use Cyrillic or Greek letters without marking the text Russian (or some other Cyrillic-using language) or Greek. >> Any advice? Either set "LaTeX encoding" = utf-8, or (the safe bet) change the example file to contain only 7-bit ASCII characters. Günter