[luatex] lua-inputenc
Elie Roux
elie.roux at telecom-bretagne.eu
Mon Feb 16 15:07:42 CET 2009
Ulrike Fischer a écrit :
> Why guessing? And why should convert luatex from utf8 to latin1 and
> back? If luatex opens a file it can check if the file contains a
> line about the encoding and then apply this encoding.
>
Because to convert the main tex file, I need to put a function in the
callback process_input_buffer, and it converts everything from latin1 to
utf, so if I want to have a file in utf, I need to convert it first
(before it is processed in process_input_buffer) in latin1, and then (in
process_input_buffer) convert it again to utf. If there is another
solution than the process_input_buffer to convert the main tex file, I
take it though...
> Above you are complaining that too much converting is involved and
> now you doing unnessary converting yourself. In your scenario you
> are converting the internal utf8 to latin1 to write the aux, and you
> are converting the content of the aux again to utf8 to handle it
> during compilation. In my scenario you only write a comment to the
> aux so that luatex knows that it is already an utf8-file and can be
> handle directly -- no input converting and no output converting
> needed.
>
> But if you really want to get aux-files in latin1: You don't need
> luatex to be able to write directly in latin1. You only need to be
> able to convert an utf8-file in e.g. latin1. You could do it after
> you closed the file.
>
I might have found a better solution that (unexpectedly) works: calling
inputenc after lua-inputenc... it works fine for my tests: it uses the
LICR, so when it reads the file again, no problem, but I need to test it
more... If it works, I'll take this solution, as my aim is to emulate
the old inputenc, not creating a new one with new aux files encoding
conventions. I think people who want to do new things with LuaTeX must
be workin in UTF-8, not using my packet (that will work for them too
anyway).
--
Elie
More information about the luatex
mailing list