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 (unicode_point_de


From: Patrice Dumas
Subject: branch master updated: * tp/Texinfo/Convert/Unicode.pm (unicode_point_decoded_in_encoding): check first if encoding is defined before calling lc().
Date: Sat, 13 Aug 2022 07:31:15 -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 c835c89e95 * tp/Texinfo/Convert/Unicode.pm 
(unicode_point_decoded_in_encoding): check first if encoding is defined before 
calling lc().
c835c89e95 is described below

commit c835c89e95731fd4dd500a81fc44a460e19e8e96
Author: Patrice Dumas <pertusus@free.fr>
AuthorDate: Sat Aug 13 13:28:10 2022 +0200

    * tp/Texinfo/Convert/Unicode.pm (unicode_point_decoded_in_encoding):
    check first if encoding is defined before calling lc().
---
 ChangeLog                     |  5 +++++
 tp/Texinfo/Convert/Unicode.pm | 19 ++++++++++---------
 2 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3aefd4ff65..1082e174e2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,11 @@
 
        * doc/texinfo.texi (\ttstylename): Remove unused.
 
+2022-08-13  Patrice Dumas  <pertusus@free.fr>
+
+       * tp/Texinfo/Convert/Unicode.pm (unicode_point_decoded_in_encoding):
+       check first if encoding is defined before calling lc().
+
 2022-08-13  Patrice Dumas  <pertusus@free.fr>
 
        * tp/Texinfo/Convert/Unicode.pm (encoded_accents)
diff --git a/tp/Texinfo/Convert/Unicode.pm b/tp/Texinfo/Convert/Unicode.pm
index 637873ca49..07504a2902 100644
--- a/tp/Texinfo/Convert/Unicode.pm
+++ b/tp/Texinfo/Convert/Unicode.pm
@@ -1481,16 +1481,17 @@ 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'
+  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);
+
+    return 1 if ($encoding eq 'utf-8'
                     or ($unicode_to_eight_bit{$encoding}
-                        and 
$unicode_to_eight_bit{$encoding}->{$unicode_point})));
+                        and 
$unicode_to_eight_bit{$encoding}->{$unicode_point}));
+  }
   return 0;
 }
 



reply via email to

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