Bug#811104: libtime-format-perl: FTBFS with non-English LC_ALL: t/doc.t failure

Niko Tyni ntyni at debian.org
Fri Jan 15 18:57:54 UTC 2016


clone 811104 -1
retitle -1 perl: I18N::Langinfo UTF-8 problems
reassign -1 perl 5.22.1-4
found -1 5.20.2-3
thanks

On Fri, Jan 15, 2016 at 07:31:57PM +0200, Niko Tyni wrote:
> Package: libtime-format-perl
> Version: 1.12-2
> User: debian-perl at lists.debian.org
> Usertags: perl-5.22-transition
> User: reproducible-builds at lists.debian.org
> Usertags: ftbfs

>   #   Failed test 'POSIX 1'
>   #   at t/doc.t line 66.
>   #          got: 'POSIXish: mardi, d�cembre 12, 1995'
>   #     expected: 'POSIXish: mardi, décembre 12, 1995'
>   # Looks like you failed 1 test of 26.
> 
> The difference is that 'got' has an é in latin1 encoding
> while 'expected' has it in utf8.
> 
> The timing when this started failing seems to coincide with Perl 5.22
> entering sid, so tentatively usertagging so. This smells a bit like a perl
> regression to me, but it might also be an intentional bugfix there.

It's a bugfix in POSIX::strftime() that highlights a bug in I18N::Langinfo.
Previously both would return UTF-8 strings without the internal
UTF-8 flag set, but POSIX::strftime() was fixed with
 http://perl5.git.perl.org/perl.git/commit/9717af6d049902fc887c412facb2d15e785ef1a4

The one-liner

% LC_ALL=fr_FR.UTF-8 perl -MDevel::Peek -MPOSIX -e "Dump POSIX::strftime('%A, %B %d, %Y', 0,0,0,12,11,95,2)"

gives on jessie an incorrect answer
  SV = PV(0x144ea90) at 0x144de78
    REFCNT = 1
    FLAGS = (TEMP,POK,pPOK)
    PV = 0x14b9650 "mardi, d\303\251cembre 12, 1995"\0
    CUR = 25
    LEN = 26

but on sid a more correct
  SV = PV(0x1f6db20) at 0x1f6cf30
    REFCNT = 1
    FLAGS = (TEMP,POK,pPOK,UTF8)
    PV = 0x1f88540 "mardi, d\303\251cembre 12, 1995"\0 [UTF8 "mardi, d\x{e9}cembre 12, 1995"]
    CUR = 25
    LEN = 26

However, both get this wrong:
% LC_ALL=fr_FR.UTF-8 perl -MDevel::Peek -MI18N::Langinfo=langinfo,MON_12 -e 'Dump langinfo(MON_12())'
SV = PV(0x1a91b20) at 0x1a90f30
  REFCNT = 1
  FLAGS = (TEMP,POK,pPOK)
  PV = 0x1aac960 "d\303\251cembre"\0
  CUR = 9
  LEN = 11

I'm cloning a bug against the perl package. Not sure how much
libtime-format-perl should adapt. Perhaps it's best to set
LC_ALL=C for now.
-- 
Niko Tyni   ntyni at debian.org



More information about the pkg-perl-maintainers mailing list