groff
[Top][All Lists]
Advanced

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

Re: [eqn] error: invalid input (character code 159)


From: Alejandro Colomar
Subject: Re: [eqn] error: invalid input (character code 159)
Date: Thu, 9 Mar 2023 19:41:39 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0


On 3/9/23 19:33, Alejandro Colomar wrote:
> Hi Branden,
> 
> Maybe it's just me, but I think there's overall consistency in software
> about the difference between warning and error meaning that warnings
> are recoverable conditions which are bad enough to be reported but not
> bad enough to break hard, while errors are those for which you can't
> recover at all.
> 
> eqn(1) seems to disagree with me :(.
> 
> $ touch man1/iconv.1
> $ make tmp/lint/man1/iconv.1.troff V=1
> LINT (tbl)    tmp/lint/man1/iconv.1.eqn
> tbl man1/iconv.1 >tmp/lint/man1/iconv.1.eqn
> LINT (eqn)    tmp/lint/man1/iconv.1.troff
> eqn -Tutf8  <tmp/lint/man1/iconv.1.eqn >tmp/lint/man1/iconv.1.troff
> eqn:man1/iconv.1:178: error: invalid input (character code 159)
> eqn:man1/iconv.1:178: error: invalid input (character code 130)
> eqn:man1/iconv.1:178: error: invalid input (character code 131)
> $ echo $?
> 0
> 
> 
> I would expect to either see "warning", or that it would exit with a
> failure (nonzero) error code.  And hopefully, I would be able to enable
> that nonzero exit code with a flag if not by default.
> 
> On the other hand, I wonder what's wrong with my commands.  man(1) is
> able to translate the characters correctly, while groff(1) doesn't.  I
> guess I'm missing some flags to eqn(1) maybe?
> 
> 
> $ man ./man1/iconv.1  | grep '\$'
>            $ iconv -f ISO-8859-15 -t UTF-8 < input.txt > output.txt
>            $ echo abc ß α € àḃç | iconv -f UTF-8 -t ASCII//TRANSLIT
> $ groff -man -Tutf8 ./man1/iconv.1  | grep '\$'
>            $ iconv -f ISO-8859-15 -t UTF-8 < input.txt > output.txt
>            $ echo abc à α ⬠à á¸Ã§ | iconv -f UTF-8 -t ASCII//TRANSLIT
> $ /usr/bin/groff -man -Tutf8 ./man1/iconv.1  | grep '\$'
>            $ iconv -f ISO-8859-15 -t UTF-8 < input.txt > output.txt
>            $ echo abc à α ⬠à á¸Ã§ | iconv -f UTF-8 -t ASCII//TRANSLIT

Now that I have intermediate files for everything, I can inspect the
entire pipeline to see which program screwed things up:


$ grep -an '\$' iconv.1.*
iconv.1.col:115:           $ iconv -f ISO-8859-15 -t UTF-8 < input.txt > 
output.txt
iconv.1.col:120:           $ echo abc à α ⬠à á¸Ã§ | iconv -f UTF-8 -t 
ASCII//TRANSLIT
iconv.1.eqn:174:$ \fBiconv \-f ISO\-8859\-15 \-t UTF\-8 < input.txt > 
output.txt\fP
iconv.1.eqn:183:$ \fBecho abc ß α € àḃç | iconv \-f UTF\-8 \-t 
ASCII//TRANSLIT\fP
iconv.1.grep:115:           $ iconv -f ISO-8859-15 -t UTF-8 < input.txt > 
output.txt
iconv.1.grep:120:           $ echo abc à α ⬠à á¸Ã§ | iconv -f UTF-8 -t 
ASCII//TRANSLIT
iconv.1.grotty:1726:t$
iconv.1.grotty:1789:t$
iconv.1.troff:193:$ \fBiconv \-f ISO\-8859\-15 \-t UTF\-8 < input.txt > 
output.txt\fP
iconv.1.troff:202:$ \fBecho abc � α � à�ç | iconv \-f UTF\-8 \-t 
ASCII//TRANSLIT\fP


It seems that it's eqn(1) that does this.  Maybe man(1) doesn't invoke
eqn(1) at all?


> 
> Cheers,
> 
> Alex
> 

-- 
<http://www.alejandro-colomar.es/>
GPG key fingerprint: A9348594CE31283A826FBDD8D57633D441E25BB5

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

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