texinfo-commits
[Top][All Lists]
Advanced

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

branch master updated: Do not restore LC_ALL


From: Gavin D. Smith
Subject: branch master updated: Do not restore LC_ALL
Date: Thu, 20 Oct 2022 10:24:28 -0400

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

gavin pushed a commit to branch master
in repository texinfo.

The following commit(s) were added to refs/heads/master by this push:
     new b6a3f58aba Do not restore LC_ALL
b6a3f58aba is described below

commit b6a3f58aba957b6659c7423881044c322f20c0c9
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Thu Oct 20 15:24:19 2022 +0100

    Do not restore LC_ALL
    
    * tp/Texinfo/Translations.pm (gdt):
    Do not restore LC_ALL as this appears to override LC_CTYPE, at
    least on DragonFlyBSD 5.9, and LC_CTYPE needs to be set correctly for
    correct iteration over UTF-8 strings by mbrtowc in the XS paragraph
    formatting module.
    
    * doc/Makefile.am (Texinfo/Commands.pm): Add $(srcdir) to rule.
---
 ChangeLog                  | 12 ++++++++++++
 tp/Makefile.am             |  2 +-
 tp/Texinfo/Translations.pm | 14 +++++++++-----
 3 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 97fdd262e1..e42914cf21 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2022-10-20  Gavin Smith  <gavinsmith0123@gmail.com>
+
+       Do not restore LC_ALL
+
+       * tp/Texinfo/Translations.pm (gdt):
+       Do not restore LC_ALL as this appears to override LC_CTYPE, at
+       least on DragonFlyBSD 5.9, and LC_CTYPE needs to be set correctly for
+       correct iteration over UTF-8 strings by mbrtowc in the XS paragraph
+       formatting module.
+
+       * doc/Makefile.am (Texinfo/Commands.pm): Add $(srcdir) to rule.
+
 2022-10-19  Gavin Smith  <gavinsmith0123@gmail.com>
 
        * doc/Makefile.am (Texinfo/Commands.pm): Avoid $< as it is not
diff --git a/tp/Makefile.am b/tp/Makefile.am
index 4c8c658d0b..45dc93aa20 100644
--- a/tp/Makefile.am
+++ b/tp/Makefile.am
@@ -325,7 +325,7 @@ Texinfo/ModulePath.pm: Texinfo/ModulePath.pm.in Makefile
 
 Texinfo/Commands.pm: Texinfo/XS/parsetexi/command_data.txt
        $(MKDIR_P) Texinfo
-       $(srcdir)/maintain/regenerate_commands_perl_info.pl < 
Texinfo/XS/parsetexi/command_data.txt
+       $(srcdir)/maintain/regenerate_commands_perl_info.pl < 
$(srcdir)/Texinfo/XS/parsetexi/command_data.txt
 
 libsrcdir = $(srcdir)/maintain/lib
 
diff --git a/tp/Texinfo/Translations.pm b/tp/Texinfo/Translations.pm
index 87e281accc..cffae3aeca 100644
--- a/tp/Texinfo/Translations.pm
+++ b/tp/Texinfo/Translations.pm
@@ -177,11 +177,15 @@ sub gdt($$;$$$)
   } else {
     $ENV{'LANGUAGE'} = $saved_LANGUAGE;
   }
-  if (defined($saved_LC_ALL)) {
-    POSIX::setlocale(LC_ALL, $saved_LC_ALL);
-  } else {
-    POSIX::setlocale(LC_ALL, '');
-  }
+
+  # Don't restore LC_ALL because this can clobber LC_CTYPE which needs
+  # to be set to 'UTF-8' in XSParagraph for iterating over UTF-8 sequences.
+  #
+  # if (defined($saved_LC_ALL)) {
+  #   POSIX::setlocale(LC_ALL, $saved_LC_ALL);
+  # } else {
+  #   POSIX::setlocale(LC_ALL, '');
+  # }
 
   my $translation_result = $translated_message;
 



reply via email to

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