Re: [Groff] Re: groff: radical re-implementation
> > What mechanism do you suggest for communication between the
> > preprocessor and troff?
> Well, I thought again and conclude that the current version of Groff
> cannot cooperate well with the preprocessor. If we want
> locale-sensibility before the re-implementation of troff, I suggest
> that groff wrapper is suitable for such an implementation. I think
> this is not so big evil.
Hmm. What about the following temporary solution:
Run the preprocessor twice; the first time it is called directly by
the groff program, and it returns an error code which groff can use
to set the -T switch. The proprocessor shouldn't do any processing
except checking the locale setting and testing the first line(s) of
the input file for an `encoding' directive'.
The second time just do the normal pipeline.
Such an algorithm can be implemented with just a few lines of code, I
> However, I think the best 'makeshift' will be that troff will
> support UTF-8 I/O without drastic change of internal of troff. I
> don't know this can be acheved with minor modification of troff or
> not, since I am not familiar with the internal of troff.
There are a lot of things to change, test, and check until 32bit input
characters are accepted...