bug-texinfo
[Top][All Lists]
Advanced

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

Re: Skip filename recoding tests on MS-Windows


From: Eli Zaretskii
Subject: Re: Skip filename recoding tests on MS-Windows
Date: Tue, 25 Oct 2022 16:26:52 +0300

> Date: Tue, 25 Oct 2022 14:54:04 +0200
> From: pertusus@free.fr
> Cc: GavinSmith0123@gmail.com, bug-texinfo@gnu.org
> 
> > It reports nothing (i.e., no diffs).
> 
> Then the test passed.  My wild guess is that, even though the \xFF is
> interpreted in the wrong locale and the character is not î, as long as
> it is wrongly interpreted consistently, it does not matter.  Windows
> assumes that it is in your current codepage, although it is untrue,
> while the Perl code assumes that it is considered as Latin1 by Windows,
> it is also untrue, but as long as it is written and read as \xFF, it's
> ok.

Yes, I think this is what happens.  As long as the byte has a
character in the system codepage, Windows will play along.

> The formatting manual_include_accented_file_name_latin1 fails, but I
> think I know why, I explained it in another mail, it is because
> DOC_ENCODING_FOR_INPUT_FILE_NAME is set to 0 for Windows, which may not
> be the best afterall, according to the test, because it is better to
> 'fool' Windows rather than get a file name with the correct characters.
> You proposed to have DOC_ENCODING_FOR_INPUT_FILE_NAME set to 0 for
> windows such that the codepage is used for the file names encoding, do
> you still think that it is a good idea in general?  (For the test, we
> can do something else, or SKIP if in Windows).

It should work if the document is indeed in the expected encoding.
But if the file is actually encoded in something other, especially if
the encoding is multibyte (like UTF-8), it will not work.

> It would be nice if you could check if formatting
> manual_include_accented_file_name_latin1_use_locale_encoding succeds or
> fail.  Could you please run
> ./test_scripts/formatting_manual_include_accented_file_name_latin1_use_locale_encoding.sh
> which is somewhat verbose and check $?.  And maybe send the whole
> output.

It says:

  $ 
./test_scripts/formatting_manual_include_accented_file_name_latin1_use_locale_encoding.sh
  testdir: formatting/
  driving_file: ./formatting//list-of-tests
  made result dir: ./formatting//res_parser/

  doing test manual_include_accented_file_name_latin1_use_locale_encoding, 
src_file ./formatting//manual_include_accented_file_name_latin1.texi
  format_option: -c TEXI2HTML
  texi2any.pl manual_include_accented_file_name_latin1_use_locale_encoding -> 
formatting//out_parser/manual_include_accented_file_name_latin1_use_locale_encoding
  /d/usr/Perl/bin/perl -w ./..//texi2any.pl -c TEXI2HTML --force --conf-dir 
./../t/init/ --conf-dir ./../init --conf-dir ./../ext -I ./formatting/ -I 
formatting// -I ./ -I .  --error-limit=1000 -c TEST=1  --output 
formatting//out_parser/manual_include_accented_file_name_latin1_use_locale_encoding/
 --info -D 'needrecodedfilenames Need recoded file names' -c 
MESSAGE_ENCODING=UTF-8 -c INPUT_FILE_NAME_ENCODING=UTF-8 
./formatting//manual_include_accented_file_name_latin1.texi > 
formatting//out_parser/manual_include_accented_file_name_latin1_use_locale_encoding/manual_include_accented_file_name_latin1.1
 
2>formatting//out_parser/manual_include_accented_file_name_latin1_use_locale_encoding/manual_include_accented_file_name_latin1.2

  all done, exiting with status 0

So it sounds like it succeeds?

Note: this is basically the 6.8.90 pretest, just slightly patched
according to a few patches: your patch in
copy_change_file_name_encoding and Gavin's patch in several files to
avoid crashes due to inconsistent memory-allocation functions being
used.  All the other changes post-6.8.90 that are in Git are not in
the code I'm running.



reply via email to

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