[Top][All Lists]

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

Re: Skip filename recoding tests on MS-Windows

From: pertusus
Subject: Re: Skip filename recoding tests on MS-Windows
Date: Tue, 25 Oct 2022 22:06:53 +0200

On Tue, Oct 25, 2022 at 09:01:30PM +0100, Gavin Smith wrote:
> On Tue, Oct 25, 2022 at 09:49:04PM +0200, pertusus@free.fr wrote:
> > > The only part that is I think different on Windows is the encoding of
> > > file names, because Windows doesn't treat file names as opaque
> > > bytestreams.  But anything that comes from a Texinfo source, even the
> > > name of an included file, should be interpreted according to
> > > @documentencoding.  When accessing included files on Windows, we
> > > should re-encode the file names to the locale's encoding, because
> > > nothing else will work reliably.  Is that what we do?
> > 
> > Yes, but it does not work reliably either, as shown by the tests
> > results.  The test which uses the locale's encoding fails (formatting
> > manual_include_accented_file_name_latin1), while the test in which the
> > document encoding is used, (formatting
> > manual_include_accented_file_name_latin1_explicit_encoding) does not
> > fail.  As analysed just before, it works because both Windows and Perl
> > are consistently wrong, but still it seems to work better.
> I don't know if I'm missing something as I didn't follow all the
> details of this discussion, but it seems that the texi2any tests tried
> to create files with names in certain encodings.  The tests didn't work
> because they weren't created properly.  

Yes, but a partial reason why is because the default for name encodings
on Windows is the codepage and not the manual encoding.

> Eli's use case is different in
> that the user is trusted to convert the file name encodings properly
> for the locale that they are using.

Indeed.  If we keep that line of thought, then we can keep on setting
the file name encoding to the codepage independently of the manual
encoding (I would need to revise the comment in the code, though).  My
point is that it is more a difference in use case than a difference in
platform, in some way.


reply via email to

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