texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: * tp/Texinfo/Convert/Unicode.pm (encoded_accents)


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/Convert/Unicode.pm (encoded_accents) (unicode_point_decoded_in_encoding): lower case the encoding argument, in case if was directly specified with -c OUTPUT_ENCODING_NAME in upper case to match with the encodings in Texinfo input, as the encoding names used here are lower cased.
Date: Sat, 13 Aug 2022 04:27:57 -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 634f6dddc7 * tp/Texinfo/Convert/Unicode.pm (encoded_accents) 
(unicode_point_decoded_in_encoding): lower case the encoding argument, in case 
if was directly specified with -c OUTPUT_ENCODING_NAME in upper case to match 
with the encodings in Texinfo input, as the encoding names used here are lower 
cased.
634f6dddc7 is described below

commit 634f6dddc790f0870945330a24e2b125fb061cca
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Aug 13 10:27:46 2022 +0200

    * tp/Texinfo/Convert/Unicode.pm (encoded_accents)
    (unicode_point_decoded_in_encoding): lower case the encoding argument,
    in case if was directly specified with -c OUTPUT_ENCODING_NAME
    in upper case to match with the encodings in Texinfo input, as the
    encoding names used here are lower cased.
---
 ChangeLog                     |  8 ++++++++
 tp/Texinfo/Convert/Unicode.pm | 11 +++++++++++
 2 files changed, 19 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index d26c1e6176..8d9add771a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2022-08-13  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Convert/Unicode.pm (encoded_accents)
+       (unicode_point_decoded_in_encoding): lower case the encoding argument,
+       in case if was directly specified with -c OUTPUT_ENCODING_NAME
+       in upper case to match with the encodings in Texinfo input, as the
+       encoding names used here are lower cased.
+
 2022-08-13  Patrice Dumas  <pertusus@free.fr>
 
        * doc/texinfo.texi (Sample Function Definition): move before
diff --git a/tp/Texinfo/Convert/Unicode.pm b/tp/Texinfo/Convert/Unicode.pm
index 1a5c070564..637873ca49 100644
--- a/tp/Texinfo/Convert/Unicode.pm
+++ b/tp/Texinfo/Convert/Unicode.pm
@@ -1459,6 +1459,11 @@ sub encoded_accents($$$$$;$)
   my $set_case = shift;
 
   if ($encoding) {
+    # in case an encoding is directly specified with -c OUTPUT_ENCODING_NAME
+    # in upper case to match with the encodings in Texinfo input, we convert
+    # to lower case to match the encoding names used here.  In the code
+    # encoding names are lower cased early.
+    $encoding = lc($encoding);
     if ($encoding eq 'utf-8') {
       return _format_unicode_accents_stack($converter, $text, $stack,
                                             $format_accent, $set_case);
@@ -1476,6 +1481,12 @@ sub unicode_point_decoded_in_encoding($$) {
   my $encoding = shift;
   my $unicode_point = shift;
 
+  # in case an encoding is directly specified with -c OUTPUT_ENCODING_NAME
+  # in upper case to match with the encodings in Texinfo input, we convert
+  # to lower case to match the encoding names used here.  In the code
+  # encoding names are lower cased early.
+  $encoding = lc($encoding);
+
   return 1 if ($encoding
                and ($encoding eq 'utf-8'
                     or ($unicode_to_eight_bit{$encoding}



reply via email to

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