On 2013-03-25, Scott Kostyshak wrote:
> On Sun, Mar 24, 2013 at 1:18 PM, Georg Baum
><georg.b...@post.rwth-aachen.de> 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.

> Can we use iconv to convert the verbatiminput file to the correct
> encoding when we copy it to the temporary directory? Or would that be
> too complicated for this minor issue?

The problem is that we do not know the encoding of the to-be-included file.
(Of course we know it in this special case, but not generally.)

Instead, we should document the issue in the master and all translations of
embedded.lyx:

  Included files must either be pure 7-bit ASCII or use the "LaTeX
  encoding" of containing document at the place of the "input inset".

  Alternatively, the "LaTeX encoding" can be changed with 
  "\inputencoding{...} as ERT before/after the inset.
  
  The "LaTeX encoding" can be set under Document>Settings>Language. The
  current default with pdftex is language-dependent (in the majority of
  cases a legacy 8-bit encoding). Documents using more than one language
  may end up with more than one "LaTeX encoding". With XeTeX or LuaTeX,
  the "LaTeX encoding" is utf-8.

Note, that 

* this is not only an issue of "verbatim input" but also affects
  "normal" input of LaTeX (and may be other) files.
  
* this is not restricted to use of Xe/LuaTeX, but can also be triggered
  under 8-bit TeX by configuring the "LaTeX encoding".

* in the light of these problems, the current default of language-specific
  LaTeX input encoding should be reconsidered. Especially the mix of several
  input encodings in one document is problematic.
  
  I suggest to use the locale encoding for LaTeX export.
  

Günter


Reply via email to