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: Mon, 24 Oct 2022 22:19:57 +0300

> Date: Mon, 24 Oct 2022 21:03:38 +0200
> From: pertusus@free.fr
> Cc: GavinSmith0123@gmail.com, bug-texinfo@gnu.org
> 
> > I've added debugging printouts and ran the above command.  What I see
> > is that encode_file_name doesn't encode the file name at all, so it
> > stays in its UTF-8 encoding, and the 'stat' in locate_include_file
> > cannot find a file by that name.  The reason encode_file_name doesn't
> > encode is that reverse_iconv is zero at entry to encode_file_name, and
> > all of input_file_name_encoding, doc_encoding_for_input_file_name, and
> 
> input_file_name_encoding should be the string "ISO-8859-1", I checked
> that it is the case for me.

Where is it set?  I mean, where is the original setting from which it
is taken the first time?  Is it some file?

> > locale_encoding are NULL.  So none of the calls to iconv are made,
> > reverse_iconv stays zero, and the file name is returned in its
> > original encoding.
> > 
> > Let me know if you want me to debug this further.
> 
> Yes, that'd probably be good, although I have no clue as what could be
> wrong.  You could add a printout in tp/Texinfo/XS/parsetex/Parsetexi.pm
> like
> 
>       } elsif ($key eq 'INPUT_FILE_NAME_ENCODING' and defined($conf->{$key})) 
> {
>         print STDERR "III $key $conf->{$key}\n";
>         conf_set_input_file_name_encoding ($conf->{$key});
> 
> If it is not set, then check earlier in texi2any.pl, maybe l 1111,
> after procesing of the command line:
> print STDERR "INPUT_FILE_NAME_ENCODING: 
> ".get_conf('INPUT_FILE_NAME_ENCODING')."\n";
> 
> Also a possible location to check would be just before calling the
> parser, near l 1364:
> print STDERR "INPUT_FILE_NAME_ENCODING: 
> $parser_file_options->{'INPUT_FILE_NAME_ENCODING'}\n";
> 
> 
> If the INPUT_FILE_NAME_ENCODING is passed to the Parser, then the best
> would probably be to check, in input.c at the end of
> set_input_file_name_encoding whether input_file_name_encoding is set
> to "ISO-8859-1".  If it is the case, I don't know what's happening as
> the variable is not used much in the code besides
> set_input_file_name_encoding.

None of these is set, and set_input_file_name_encoding ans
set_locale_encoding are called with value of NULL.

> If it is not set, maybe a printout in
> conf_set_locale_encoding in api.c cound be relevant

What should I print there?

> or looking at Parsetexi.c to see if something is strange.

Where to look there?



reply via email to

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