[luatex] Input/output and encoding.

Manuel Pégourié-Gonnard mpg at elzevir.fr
Sun Aug 1 19:18:46 CEST 2010


Hi,

Let's try with the following variation of your example:

Le 01/08/2010 18:50, Paul Isambert a écrit :
> \directlua{%
>  function convert(buf)
>    return string.gsub(buf,"(.)",
>                       function (ch) return unicode.utf8.char(string.byte(ch))
>      end)
>  end
>  callback.register('process_input_buffer',convert)
>  }
> 
> \immediate\openout0=\jobname.xxx
> \immediate\write0{Héhé.}

\immediate\write0{\def\foo{Héhé.}} % instead

> \immediate\closeout0
> 
> \directlua{callback.register('process_input_buffer',nil)}
> \input \jobname.xxx

\show\foo % added

> \bye
> 
Now it looks working.

OTOH, a simple

Héhé.\bye

won't work.

So I think the problem is not at all due to playing with the callbacks, but only
to the default font missing the "é' character.

Manuel.


More information about the luatex mailing list