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): do not use input encoding to determine the encoding used in index key sorting.
Date: Sun, 29 Aug 2021 07:42:41 -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 39ccc68  * tp/Texinfo/Structuring.pm 
(setup_index_entry_keys_formatting): do not use input encoding to determine the 
encoding used in index key sorting.
39ccc68 is described below

commit 39ccc685354add17846b2e63409926a4dc9a2919
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sun Aug 29 13:42:29 2021 +0200

    * tp/Texinfo/Structuring.pm (setup_index_entry_keys_formatting):
    do not use input encoding to determine the encoding used in index
    key sorting.
---
 ChangeLog                                     | 6 ++++++
 tp/Texinfo/Structuring.pm                     | 9 ---------
 tp/t/results/latex_tests/indices.pl           | 2 +-
 tp/t/results/macro/macro_in_index_commands.pl | 2 +-
 tp/t/results/value/value_in_index_commands.pl | 2 +-
 tp/t/test_sort.t                              | 3 +++
 6 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 76cd53a..9c5eefb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2021-08-29  Patrice Dumas  <pertusus@free.fr>
 
+       * tp/Texinfo/Structuring.pm (setup_index_entry_keys_formatting):
+       do not use input encoding to determine the encoding used in index
+       key sorting.
+
+2021-08-29  Patrice Dumas  <pertusus@free.fr>
+
        * tp/Texinfo/Convert/Converter.pm (converter),
        tp/Texinfo/Convert/HTML.pm (_load_htmlxref_files, output),
        tp/Texinfo/Convert/IXIN.pm (output_ixin),
diff --git a/tp/Texinfo/Structuring.pm b/tp/Texinfo/Structuring.pm
index f5021d9..75837aa 100644
--- a/tp/Texinfo/Structuring.pm
+++ b/tp/Texinfo/Structuring.pm
@@ -1612,15 +1612,6 @@ sub setup_index_entry_keys_formatting($$$)
   my $options = {'sort_string' => 1,
                  
Texinfo::Common::_convert_text_options($configuration_informations)};
 
-  # FIXME really useful and not incorrect?  Should be already set according
-  # to OUTPUT_ENCODING_NAME.  May not be set because parser configuration
-  # is used instead of converter configuration, but this does not make
-  # it right to set the input encoding.
-  if ($configuration_informations->get_conf('ENABLE_ENCODING')
-      and $parser_informations->{'input_encoding_name'}
-      and not defined($options->{'enabled_encoding'})) {
-    $options->{'enabled_encoding'} = 
$parser_informations->{'input_encoding_name'};
-  }
   return $options, $ignore_chars;
 }
 
diff --git a/tp/t/results/latex_tests/indices.pl 
b/tp/t/results/latex_tests/indices.pl
index aab2861..afd9a5c 100644
--- a/tp/t/results/latex_tests/indices.pl
+++ b/tp/t/results/latex_tests/indices.pl
@@ -335,7 +335,7 @@ $result_trees{'indices'} = {
               'index_at_command' => 'cindex',
               'index_name' => 'cp',
               'index_type_command' => 'cindex',
-              'key' => "a!\"\@b \"!\@ \x{e4} \x{f6}",
+              'key' => 'a!"@b "!@ a" o"',
               'node' => {},
               'number' => 1
             },
diff --git a/tp/t/results/macro/macro_in_index_commands.pl 
b/tp/t/results/macro/macro_in_index_commands.pl
index 115bcc5..51d290f 100644
--- a/tp/t/results/macro/macro_in_index_commands.pl
+++ b/tp/t/results/macro/macro_in_index_commands.pl
@@ -667,7 +667,7 @@ $result_trees{'macro_in_index_commands'} = {
               'index_at_command' => 'codeidxindex',
               'index_name' => 'codeidx',
               'index_type_command' => 'codeidxindex',
-              'key' => "a index entry t\x{e9} \x{ee}",
+              'key' => 'a index entry te\' i^',
               'node' => {},
               'number' => 1
             },
diff --git a/tp/t/results/value/value_in_index_commands.pl 
b/tp/t/results/value/value_in_index_commands.pl
index 828a685..eff991c 100644
--- a/tp/t/results/value/value_in_index_commands.pl
+++ b/tp/t/results/value/value_in_index_commands.pl
@@ -562,7 +562,7 @@ $result_trees{'value_in_index_commands'} = {
               'index_at_command' => 'codeidxindex',
               'index_name' => 'codeidx',
               'index_type_command' => 'codeidxindex',
-              'key' => "a index entry t\x{e9} \x{ee}",
+              'key' => 'a index entry te\' i^',
               'node' => {},
               'number' => 1
             },
diff --git a/tp/t/test_sort.t b/tp/t/test_sort.t
index 7c7a63a..14d92a6 100644
--- a/tp/t/test_sort.t
+++ b/tp/t/test_sort.t
@@ -44,6 +44,9 @@ my ($index_names, $merged_indices) =
    $parser->indices_information();
 my $index_entries = Texinfo::Structuring::merge_indices($index_names);
 my $parser_informations = $parser->global_informations();
+# FIXME this is not very clean, there should be an object
+# holding only configuration instead
+$parser->{'OUTPUT_ENCODING_NAME'} = 
$parser_informations->{'input_encoding_name'};
 my $sorted_index_entries 
   = Texinfo::Structuring::sort_indices($parser, $parser, $parser_informations,
                                           $index_entries, $index_names);



reply via email to

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