bug-texinfo
[Top][All Lists]
Advanced

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

Re: Non-ASCII characters in @include search path


From: Patrice Dumas
Subject: Re: Non-ASCII characters in @include search path
Date: Sun, 20 Feb 2022 14:28:23 +0100

On Sun, Feb 20, 2022 at 01:09:06PM +0000, Gavin Smith wrote:
> On Sun, Feb 20, 2022 at 01:45:19PM +0100, Patrice Dumas wrote:
> > On Sun, Feb 20, 2022 at 01:10:16PM +0100, Patrice Dumas wrote:
> > > 
> > > I think that the correct way to do that is to use
> > > Encode::encode($text, 'utf-8');
> > > Also I think that it should be done as late as possible, so it would be
> > > better on $possible_file.
> 
> My thought was that the argument to -I could have been any sequence of bytes,
> not necessarily correct UTF-8.  It would be wrong then to attempt any
> encoding or decoding to a string formed from such an argument.

Indeed, that must be what is happening here.  I think that it is not
necessarily wrong to do decoding.  Actually, if the locale is not
consistent with the encoding expected for file names, it would be even
better to first decode command line arguments to the perl internal
unicode encoding, then encode to the encoding that should work for
operations using filenames.

That is the solution that I would favor.

-- 
Pat



reply via email to

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