On Sun, Feb 20, 2022 at 02:53:46PM +0000, Gavin Smith wrote:
> 
> Decoding command-line arguments might be a good idea for everything
> EXCEPT file names.  Why go to the bother of decoding file names when
> they have to be encoded again to use them?

Another reason for decoding and encoding everything is error messages.
I am actually a bit surprised that nobody ever complained that error
messages are not encoded.

For example, in the following the file name is output correctly as it is
not decoded, but the string from the Texinfo file is decoded but not
encoded and hence ends up incorrect in the message.  Decoding everything
and then encoding the error messages should allow to mix strings from
different sources and different encodings.

$ ./texi2any.pl testé.texi
testé.texi:8: warning: node `�sseul�' unreferenced


$ cat testé.texi 
\input texinfo.tex

@setfilename testé.info

@node Top
@top Testé

@node ésseulé

@node Chapitré
@chapter Chapitré

-- 
Pat

Reply via email to