groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AW: Unable to get GROFF_ENCODING to seep through to sourced subfiles


From: Walter Harms
Subject: AW: Unable to get GROFF_ENCODING to seep through to sourced subfiles
Date: Wed, 11 Nov 2020 13:21:29 +0000

If that does not work try (assuming bash):
export GROFF_ENCODING=utf8
groff_pipeline

rationale:
doing
GROFF_ENCODING=utf8 groff_pipeline
is setting GROFF_ENCODING for the first element only, if anything later in the 
pipe needs that also it is lost. Using export means that subshell also have 
this value.

hope that helps
 re,
 wh
________________________________________
Von: groff <groff-bounces+wharms=bfs.de@gnu.org> im Auftrag von Bjarni Ingi 
Gislason <bjarniig@rhi.hi.is>
Gesendet: Dienstag, 10. November 2020 23:40:04
An: Dorai Sitaram
Cc: groff@gnu.org
Betreff: Re: Unable to get GROFF_ENCODING to seep through to sourced subfiles

On Mon, Nov 09, 2020 at 03:58:38PM +0000, Dorai Sitaram via wrote:
> I have GROFF_ENCODING set to utf8, but this only works for the main file 
> processed by groff, not to any subfiles that are sourced via .so .
> Giving the -s option to groff to force a soelim doesn't work either.
> Adding the -k option to force a preconv, whether before or after the -s 
> option, doesn't work either. (I think regardless of the placement of -k and 
> -s, -k happens before -s, hence the problem? Perhaps -k should be forced to 
> happen last?)
> What does work is
> soelim mainDoc.ms | preconv | groff ...
> but it would be nice to avoid the pipelines with either options and/or 
> environment variable.
> Thanks--d

  By using the '-V' option one can see the pipeline,
 that "groff" constructs, for example:

a) "groff -s -k -V file" shows:

preconv file | soelim | troff -Tps | grops

b) "GROFF_ENCODING=utf8 groff -s -V file" shows

preconv -eutf8 file | soelim | troff -Tps | grops

  To get the right order, a patch must by applied,
 for example, that in groff-bug #59442:

"groff -s -k -V file" shows then

soelim file | preconv | troff -Tps | grops

  This does not work, as "preconv" needs an explicit encoding,
 when it gets the data from the standard input.


"GROFF_ENCODING=utf8 groff -s -V file" shows then

soelim file | preconv -eutf8 | troff -Tps | grops


  or the "-K" option for "groff" can be used instead of
"GROFF_ENCODING".

--
Bjarni I. Gislason




reply via email to

[Prev in Thread] Current Thread [Next in Thread]