[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[7688] MiscXS.pm check for UTF-8 locale
From: |
gavinsmith0123 |
Subject: |
[7688] MiscXS.pm check for UTF-8 locale |
Date: |
Sun, 12 Mar 2017 18:13:40 -0400 (EDT) |
Revision: 7688
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=7688
Author: gavin
Date: 2017-03-12 18:13:40 -0400 (Sun, 12 Mar 2017)
Log Message:
-----------
MiscXS.pm check for UTF-8 locale
Modified Paths:
--------------
trunk/ChangeLog
trunk/tp/Texinfo/MiscXS.pm
trunk/tp/Texinfo/XSLoader.pm
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2017-03-12 20:42:30 UTC (rev 7687)
+++ trunk/ChangeLog 2017-03-12 22:13:40 UTC (rev 7688)
@@ -1,5 +1,12 @@
2017-03-12 Gavin Smith <address@hidden>
+ * tp/Texinfo/MiscXS.pm: Check for UTF-8 locale, copied from
+ tp/Texinfo/Convert/Paragraph.pm.
+ * tp/Texinfo/XSLoader.pm (init): Allow argument with name of
+ XS module to be undefined.
+
+2017-03-12 Gavin Smith <address@hidden>
+
* doc/info-stnd.texi (Cursor Commands): Move text out of
footnote into main text.
(Searching Commands): Add a missing ')'.
Modified: trunk/tp/Texinfo/MiscXS.pm
===================================================================
--- trunk/tp/Texinfo/MiscXS.pm 2017-03-12 20:42:30 UTC (rev 7687)
+++ trunk/tp/Texinfo/MiscXS.pm 2017-03-12 22:13:40 UTC (rev 7688)
@@ -27,9 +27,21 @@
use Texinfo::XSLoader;
BEGIN {
+ our $xsmodule = "Texinfo::MiscXS";
+ # Check for a UTF-8 locale. Skip the check if the 'locale' command doesn't
+ # work.
+ our $a;
+ if ($^O ne 'MSWin32') {
+ $a = `locale -a 2>/dev/null`;
+ }
+ if ($a and $a !~ /UTF-8/ and $a !~ /utf8/) {
+ # Do not use XS module
+ $xsmodule = undef;
+ }
+
Texinfo::XSLoader::init (
"Texinfo::MiscXS",
- "Texinfo::MiscXSXS",
+ $xsmodule,
"Texinfo::MiscXS",
"MiscXS",
0,
Modified: trunk/tp/Texinfo/XSLoader.pm
===================================================================
--- trunk/tp/Texinfo/XSLoader.pm 2017-03-12 20:42:30 UTC (rev 7687)
+++ trunk/tp/Texinfo/XSLoader.pm 2017-03-12 22:13:40 UTC (rev 7688)
@@ -113,6 +113,10 @@
_fatal $fatal_message;
goto FALLBACK;
}
+
+ if (!$module) {
+ goto FALLBACK;
+ }
my ($libtool_dir, $libtool_archive);
if ($TEXINFO_XS ne 'standalone') {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [7688] MiscXS.pm check for UTF-8 locale,
gavinsmith0123 <=