Andries Brouwer wrote:
> If there is a pipeline, then earlier
> stages in the pipeline already need the character set.
> So, conversion may have to be done before the input reaches groff.
Yes, and that's why groff is designed as a set of filters. If you need
one of the filters early on, just call it yourself. The second call, by
groff, will then be a nop.
Btw, if a program in the pipeline, before groff, actually needs the
character set, it will be able to infer it from the "coding:" marker.
Whereas in the past, without a marker, it cannot know whether it's processing
something in KOI8-R or ISO-8859-5.
> And that also brings up a different point. If I have a file
> that has topline -*- coding: EUC-JP -*- and I feed it to
> a program like iconv, must that program change the topline?
The "gpreconv" filter must be idempotent:
gpreconv | gpreconv == gpreconv.
Whether it achieves this by converting the input to UTF-8 and changing the
marker to "coding: utf-8", or whether it converts the input to ASCII with
lots of \[...] or \N[...] escape sequences and leaves the marker in place,
is an unimportant detail.
Bruno
_______________________________________________
Groff mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/groff