texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/Structuring.pm (setup_index_entry_ke


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/Structuring.pm (setup_index_entry_keys_formatting): set sort_string option for conversion to text only if ENABLE_ENCODING is unset or encoding is not UTF-8.
Date: Mon, 26 Dec 2022 10:58:25 -0500

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 228bbca6b1 * tp/Texinfo/Structuring.pm 
(setup_index_entry_keys_formatting): set sort_string option for conversion to 
text only if ENABLE_ENCODING is unset or encoding is not UTF-8.
228bbca6b1 is described below

commit 228bbca6b1f4e6b10e7463d9b8cc746b019bd023
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Mon Dec 26 16:58:15 2022 +0100

    * tp/Texinfo/Structuring.pm (setup_index_entry_keys_formatting): set
    sort_string option for conversion to text only if ENABLE_ENCODING is
    unset or encoding is not UTF-8.
---
 ChangeLog                 |  6 ++++++
 tp/Texinfo/Structuring.pm | 15 +++++++++------
 2 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 416b539064..2f2db9a9cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2022-12-26  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Structuring.pm (setup_index_entry_keys_formatting): set
+       sort_string option for conversion to text only if ENABLE_ENCODING is
+       unset or encoding is not UTF-8.
+
 2022-12-26  Patrice Dumas  <pertusus@free.fr>
 
        * doc/texinfo.texi (Conditional Nesting): comment out text on @ignore
diff --git a/tp/Texinfo/Structuring.pm b/tp/Texinfo/Structuring.pm
index 39b4b4e5f4..10523e57d3 100644
--- a/tp/Texinfo/Structuring.pm
+++ b/tp/Texinfo/Structuring.pm
@@ -1764,12 +1764,15 @@ sub _sort_index_entries($$$)
 
 sub setup_index_entry_keys_formatting($)
 {
-  my $customization_information = shift;
-
-  # obeys ENABLE_ENCODING
-  my $options = {'sort_string' => 1, 'ascii_punctuation' => 1,
-   Texinfo::Convert::Text::copy_options_for_convert_text(
-                                  $customization_information)};
+  my $customization_info = shift;
+
+  my $options = {'ascii_punctuation' => 1,
+     Texinfo::Convert::Text::copy_options_for_convert_text(
+                                  $customization_info)};
+  if (not $customization_info->get_conf('ENABLE_ENCODING')
+      or lc($customization_info->get_conf('OUTPUT_ENCODING_NAME')) ne 'utf-8') 
{
+    $options->{'sort_string'} = 1;
+  }
 
   return $options;
 }



reply via email to

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