[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] can't translate character code 229 to special character `oa'
From: |
Ralph Corderoy |
Subject: |
Re: [Groff] can't translate character code 229 to special character `oa' in transparent throughput |
Date: |
Thu, 11 Jun 2015 15:18:17 +0100 |
Hi Eli,
> - system("groff -Tpdf -dPDF.EXPORT=1 -mom -z $cmdstring 2>&1 | grep
> '^\.ds' | groff -Tpdf -mom - $preconv $cmdstring");
> + system("groff -Tpdf -dPDF.EXPORT=1 -mom -z $cmdstring 2>&1 | grep
> \"^\.ds\" | groff -Tpdf -mom - $preconv $cmdstring");
This looks wrong both times. :-) It's a double-quoted string in perl,
so backslash is interpreted as an escape thus \. needlessly escapes the
non-special dot giving just a dot and grep sees `^.ds' for the pattern
AFAICS.
$ perl
system("prargv a\.b 'a\.b' \"a\.b\" \"a\\.b\"");
0 '/home/ralph/bin/prargv'
1 'a.b'
2 'a.b'
3 'a.b'
4 'a\\.b'
$
#4 is what's wanted; prargv is Python's repr() function, so that's a
four-character string and grep will escape the any-character
meta-character in the regexp.
Cheers, Ralph.
- [Groff] can't translate character code 229 to special character `oa' in transparent throughput, mikkel meinike, 2015/06/10
- Re: [Groff] can't translate character code 229 to special character `oa' in transparent throughput, Keith Marshall, 2015/06/10
- Re: [Groff] can't translate character code 229 to special character `oa' in transparent throughput, Deri James, 2015/06/10
- Re: [Groff] can't translate character code 229 to special character `oa' in transparent throughput, mikkel meinike, 2015/06/10
- Re: [Groff] can't translate character code 229 to special character `oa' in transparent throughput, Deri James, 2015/06/10
- Re: [Groff] can't translate character code 229 to special character `oa' in transparent throughput, Eli Zaretskii, 2015/06/11
- Re: [Groff] can't translate character code 229 to special character `oa' in transparent throughput, mikkel meinike, 2015/06/11
- Re: [Groff] can't translate character code 229 to special character `oa' in transparent throughput,
Ralph Corderoy <=
- Re: [Groff] can't translate character code 229 to special character `oa' in transparent throughput, Eli Zaretskii, 2015/06/11
- Re: [Groff] can't translate character code 229 to special character `oa' in transparent throughput, Eli Zaretskii, 2015/06/11