texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: Encode @setfilename argument


From: Gavin D. Smith
Subject: branch master updated: Encode @setfilename argument
Date: Sat, 26 Feb 2022 14:00:46 -0500

This is an automated email from the git hooks/post-receive script.

gavin pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new f3ca2554c0 Encode @setfilename argument
f3ca2554c0 is described below

commit f3ca2554c0a7020a0a8d324d07290e0e6c503714
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sat Feb 26 18:56:33 2022 +0000

    Encode @setfilename argument
    
    * tp/Texinfo/Convert/Converter.pm (determine_files_and_directory):
    Call Texinfo::Common::encode_file_name on @setfilename argument.
    
    This mean that @setfilename works properly for a
    '@documentencoding ISO-8859-1' and also means that
    the OUTDIR customization variable works correctly.
---
 ChangeLog                       | 11 +++++++++++
 tp/Texinfo/Convert/Converter.pm | 10 ++++++++++
 2 files changed, 21 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index d6cbab2945..4f3944256d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2022-02-26  Gavin Smith  <gavinsmith0123@gmail.com>
+
+       Encode @setfilename argument
+
+       * tp/Texinfo/Convert/Converter.pm (determine_files_and_directory):
+       Call Texinfo::Common::encode_file_name on @setfilename argument.
+
+       This mean that @setfilename works properly for a
+       '@documentencoding ISO-8859-1' and also means that
+       the OUTDIR customization variable works correctly.
+
 2022-02-24  Gavin Smith  <gavinsmith0123@gmail.com>
 
        UTF-8 flag on strings for XS parser
diff --git a/tp/Texinfo/Convert/Converter.pm b/tp/Texinfo/Convert/Converter.pm
index 4ca8a64835..3225420010 100644
--- a/tp/Texinfo/Convert/Converter.pm
+++ b/tp/Texinfo/Convert/Converter.pm
@@ -554,6 +554,16 @@ sub determine_files_and_directory($;$)
        = $self->{'global_commands'}->{'setfilename'}->{'extra'}->{'text_arg'};
   }
 
+  if ($setfilename) {
+    my $document_encoding;
+    my $ignored;
+    $document_encoding = $self->{'parser_info'}->{'input_perl_encoding'}
+      if ($self->{'parser_info'}
+            and defined($self->{'parser_info'}->{'input_perl_encoding'}));
+    ($setfilename, $ignored) = Texinfo::Common::encode_file_name(
+      $self, $setfilename, $document_encoding);
+  }
+
   my $input_basename_for_outfile = $input_basename;
   my $setfilename_for_outfile = $setfilename;
   # PREFIX overrides both setfilename and the input file base name



reply via email to

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