> From: Gavin Smith <[email protected]>
> Date: Mon, 18 Feb 2019 20:09:33 +0000
> Cc: [email protected]
> 
> On Mon, Feb 18, 2019 at 05:36:00PM +0200, Eli Zaretskii wrote:
> > Thanks, I think I see the problem.  It's because the code manages
> > input_encoding on the input_stack.  Which means each included file
> > starts up with input_encoding of zero (which happens to stand for
> > latin-1), and when reading of the include file is exhausted, the code
> > pops input_stack, so any @documentencoding set by an include file is
> > thrown away, and any file included after @documentencoding has its
> > encoding reset to latin-1.  But @documentencoding is a global setting,
> > and once set, it should remain in effect for any stuff read
> > thereafter, until it is changed by another @documentencoding, or until
> > EOF.  I think this means input_encoding should be part of global_info,
> > not of input_stack.
> 
> Okay, this makes sense.  I don't know if I'll have time to fix this in 
> the next few days.

There's no rush.  The (slower) Perl parser works OK.

> I can't remember what I was thinking when I wrote this code, but I may 
> have been thinking about the case of different encodings in different
> input files.  I don't think that use case is worth supporting, though.

It would be backward-incompatible, at the very least.

Reply via email to