texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/t/test_utils.pl (test): call explicitely Tex


From: Patrice Dumas
Subject: branch master updated: * tp/t/test_utils.pl (test): call explicitely Texinfo::Common::set_output_perl_encoding for HTML for outputting result files, as OUTPUT_PERL_ENCODING is not set if with XS and there is no user-defined functions called through the HTML customization API.
Date: Tue, 01 Oct 2024 12:26:35 -0400

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

pertusus pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new 07deeb37dc * tp/t/test_utils.pl (test): call explicitely 
Texinfo::Common::set_output_perl_encoding for HTML for outputting result files, 
as OUTPUT_PERL_ENCODING is not set if with XS and there is no user-defined 
functions called through the HTML customization API.
07deeb37dc is described below

commit 07deeb37dc752e4555de1f237ee35e6b67536e17
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Thu Jul 25 00:25:55 2024 +0200

    * tp/t/test_utils.pl (test): call explicitely
    Texinfo::Common::set_output_perl_encoding for HTML for outputting
    result files, as OUTPUT_PERL_ENCODING is not set if with XS and
    there is no user-defined functions called through the HTML
    customization API.
---
 ChangeLog          |  8 ++++++++
 tp/t/test_utils.pl | 13 +++++++++++--
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 898a60b037..77cb412fd4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,14 @@
        (call_formatting_function_format_single_footnote): check and reset
        flags in build_html_formatting_state.
 
+2024-07-24  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/t/test_utils.pl (test): call explicitely
+       Texinfo::Common::set_output_perl_encoding for HTML for outputting
+       result files, as OUTPUT_PERL_ENCODING is not set if with XS and
+       there is no user-defined functions called through the HTML
+       customization API.
+
 2024-07-24  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/XS/main/call_perl_function.c
diff --git a/tp/t/test_utils.pl b/tp/t/test_utils.pl
index 791130000d..469659f58c 100644
--- a/tp/t/test_utils.pl
+++ b/tp/t/test_utils.pl
@@ -1329,10 +1329,19 @@ sub test($$)
             warn "ERROR: open $outfile: $!\n";
           } else {
             # output() or convert() called in convert_to_* calls set_document,
-            # which calls Texinfo::Common::set_output_perl_encodings, so
-            # OUTPUT_PERL_ENCODING should be set in all the formats converters.
+            # which calls Texinfo::Common::set_output_perl_encoding, so
+            # OUTPUT_PERL_ENCODING should be set in all the formats converters
+            # in pure Perl.  For HTML with XS, set_output_perl_encodings is 
only
+            # called if there is user-defined Perl code called through the
+            # customization API.  Since this is not the case here, we call
+            # explicitely set_output_perl_encodings.
             my $output_file_encoding
                       = $converter->get_conf('OUTPUT_PERL_ENCODING');
+            if (!defined($output_file_encoding) and $format =~ /^html/) {
+              Texinfo::Common::set_output_perl_encoding($converter);
+              $output_file_encoding
+                      = $converter->get_conf('OUTPUT_PERL_ENCODING');
+            }
             if (defined($output_file_encoding)
                    and $output_file_encoding ne '') {
               binmode(OUTFILE, ":encoding($output_file_encoding)");



reply via email to

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