bug-texinfo
[Top][All Lists]
Advanced

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

Re: texinfo-6.0.92 make check has 12 FAILs on Solaris10 x86/x64


From: Gavin Smith
Subject: Re: texinfo-6.0.92 make check has 12 FAILs on Solaris10 x86/x64
Date: Sat, 23 Jan 2016 13:10:28 +0000

>> > How about deduce the name from `locale -a|grep $LANG` ?
>> >
>>
>> That's what I've done in the latest revision (SVN 6955).
>
> Bother: what will that do on non-Posix systems, where the 'locale'
> command is not necessarily available, and even if it is, its output is
> generally irrelevant.  E.g., I have a locale.exe on my system that
> came with the Windows port of Git -- it displays the locales which Git
> can handle, but any other native Windows program will not, and in
> particular native Windows programs cannot use UTF-8 as the locale's
> codeset anyway.  I know that some users put the Git's bin directory on
> PATH, so for them invoking 'locale -a' will "succeed", and makeinfo
> will attempt to use the UTF-8 locale.

I'd wondered about that, which is why I skipped the check if "locale
-a" failed. But if locale -a appears to succeed, but it's a different
"locale" program that was run, that is a problem. It isn't a problem
in xspara.c because the code there won't be run under Windows
(w32_setlocale will succeed), but is a problem in Paragraph.pm which
tries to run "locale -a".

>
> Is this needed outside of the test suite?  (The subject says "make
> check fails", so I thought maybe the problem is limited to the tests.)
> If so, I think we should skip that test on Windows (except for Cygwin,
> which emulates a Posix system well enough for this matter).
>
> WDYT?

The check is needed regardless of whether the test suite is being run
or not: if no UTF-8 locale can be found, the XS paragraph module won't
work (except under Windows, when it will work).

Can you suggest how the test could be skipped under Windows, or any
other system where "locale" doesn't work?

The test currently looks like:
# Check for a UTF-8 locale.  Skip the check if the 'locale' command doesn't
# work.
my $a = `locale -a 2>/dev/null`;
if ($a and $a !~ /UTF-8/ and $a !~ /utf8/) {
  _fatal "couldn't find a UTF-8 locale";
  goto FALLBACK;
}
if (!$a) {
  _debug "couldn't run 'locale -a': skipping check for a UTF-8 locale";
}



reply via email to

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