texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/Convert/Converter.pm (determine_file


From: Gavin D. Smith
Subject: branch master updated: * tp/Texinfo/Convert/Converter.pm (determine_files_and_directory): Use '?' as replacement character when decoding input filename.
Date: Sun, 06 Mar 2022 05:25:49 -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 bf27043fa5 * tp/Texinfo/Convert/Converter.pm 
(determine_files_and_directory): Use '?' as replacement character when decoding 
input filename.
bf27043fa5 is described below

commit bf27043fa5d488213ab97ae0ace7abbca9f629cf
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Sun Mar 6 10:25:39 2022 +0000

    * tp/Texinfo/Convert/Converter.pm (determine_files_and_directory):
    Use '?' as replacement character when decoding input filename.
---
 ChangeLog                       | 5 +++++
 tp/Texinfo/Convert/Converter.pm | 4 +++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 0bd4c52217..57e0526a5b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2022-03-06  Gavin Smith  <gavinsmith0123@gmail.com>
+
+       * tp/Texinfo/Convert/Converter.pm (determine_files_and_directory):
+       Use '?' as replacement character when decoding input filename.
+
 2022-03-06  Patrice Dumas  <pertusus@free.fr>
 
        Decode init file names in messages
diff --git a/tp/Texinfo/Convert/Converter.pm b/tp/Texinfo/Convert/Converter.pm
index 0b5d79f66d..1c8ffc7d88 100644
--- a/tp/Texinfo/Convert/Converter.pm
+++ b/tp/Texinfo/Convert/Converter.pm
@@ -545,7 +545,9 @@ sub determine_files_and_directory($;$)
     my $input_file_name = $self->{'parser_info'}->{'input_file_name'};
     my $encoding = $self->get_conf('DATA_INPUT_ENCODING_NAME');
     if (defined($encoding)) {
-      $input_file_name = decode($encoding, $input_file_name);
+      $input_file_name = decode($encoding, $input_file_name, sub { '?' });
+      # use '?' as replacement character rather than U+FFFD in case it
+      # is re-encoded to an encoding without this character
     }
     my ($directories, $suffix);
     ($input_basefile, $directories, $suffix) = fileparse($input_file_name);



reply via email to

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