[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] pdfmom grep (was parallel text processing)
From: |
Ralph Corderoy |
Subject: |
Re: [Groff] pdfmom grep (was parallel text processing) |
Date: |
Sat, 09 Sep 2017 10:31:14 +0100 |
Hi Peter,
> The grep in pdfmom is returning a binary file hit when it encounters
> the diacritic in
>
> .ds pdf:look(pdf:bm1) L'étranger
What does locale(1) output for you where you run this pdfmom command?
> The solution is to pass the -a flag to grep.
How about
groff ... 2>&1 | LC_ALL=C grep '^\.ds' | groff ...
BTW, pdfmom has a bug shown by that strace command I suggested.
system("groff ... 2>&1 | grep '^\.ds' | groff ...");
That's a double-quoted Perl string so `\.' is escaping the dot and grep
sees a plain dot for `any character'. The backslash needs doubling.
$ perl -wl
print "groff ... 2>&1 | grep '^\.ds' | groff ...";
print "groff ... 2>&1 | grep '^\\.ds' | groff ...";
^D
groff ... 2>&1 | grep '^.ds' | groff ...
groff ... 2>&1 | grep '^\.ds' | groff ...
$
> Question: why does grep treat the presence of the diacritic as cause
> for saying "Binary file (standard input) matches"?
Need `locale's output. :-)
--
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy
- Re: [Groff] parallel text processing ; vertical and horizontal mode, (continued)
- Re: [Groff] parallel text processing ; vertical and horizontal mode, Deri James, 2017/09/07
- Re: [Groff] parallel text processing ; vertical and horizontal mode, Ralph Corderoy, 2017/09/08
- [Groff] pdfmom grep (was parallel text processing), Peter Schaffter, 2017/09/08
- Re: [Groff] pdfmom grep (was parallel text processing), Steffen Nurpmeso, 2017/09/08
- Re: [Groff] pdfmom grep (was parallel text processing), Steffen Nurpmeso, 2017/09/08
- Re: [Groff] pdfmom grep (was parallel text processing), Steffen Nurpmeso, 2017/09/08
- Re: [Groff] pdfmom grep (was parallel text processing), Peter Schaffter, 2017/09/08
- Re: [Groff] pdfmom grep (was parallel text processing),
Ralph Corderoy <=
- Re: [Groff] pdfmom grep (was parallel text processing), Peter Schaffter, 2017/09/09
- Re: [Groff] pdfmom grep (was parallel text processing), Ralph Corderoy, 2017/09/09
- Re: [Groff] pdfmom grep (was parallel text processing), Peter Schaffter, 2017/09/09
- Re: [Groff] pdfmom grep (was parallel text processing), Ralph Corderoy, 2017/09/10
- Re: [Groff] pdfmom grep (was parallel text processing), Peter Schaffter, 2017/09/10
- Re: [Groff] pdfmom grep (was parallel text processing), Deri James, 2017/09/09
- Re: [Groff] parallel text processing ; vertical and horizontal mode, Ralph Corderoy, 2017/09/07
- Re: [Groff] parallel text processing ; vertical and horizontal mode, Mike Bianchi, 2017/09/07
Re: [Groff] parallel text processing ; vertical and horizontal mode, Ted Harding, 2017/09/06
Re: [Groff] parallel text processing ; vertical and horizontal mode, Larry Kollar, 2017/09/13