Skip Menu |

This queue is for tickets about the TAP-Formatter-HTML CPAN distribution.

Report information
The Basics
Id: 132072
Status: new
Priority: 0/
Queue: TAP-Formatter-HTML

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.11
Fixed in: (no value)



Subject: Date in report may contain broken characters
On a system running perl 5.28.0 and a German locale (LANG=de_DE.UTF-8) the date in the HTML looks broken (at least in March): <div id="footer">Generated by TAP::Formatter::HTML v0.11 @ 09:50:17 06-M�r-2020</div> This was not the case with older perl versions, e.g. with perl 5.12.3. I think that the problem is caused by a change in the handling of POSIX::strftime regarding the internal utf8 flag, probably since perl 5.22.0. Maybe the problem may be fixed for newer perls by calling binmode(..., ':utf8) (not tested), but I fear that it will then appear broken for older perls. Another possible fix is to not use a localized date, but something close to ISO8601, e.g. like this: <div id="footer">Generated by [% formatter.class %] v[% formatter.version %] @ [% USE date %][% date.format(date.now, "%F %T") %]</div>
On 2020-03-06 05:18:31, SREZIC wrote: Show quoted text
> On a system running perl 5.28.0 and a German locale (LANG=de_DE.UTF-8) > the date in the HTML looks broken (at least in March): > > <div id="footer">Generated by TAP::Formatter::HTML v0.11 @ 09:50:17 > 06-M�r-2020</div> > > This was not the case with older perl versions, e.g. with perl 5.12.3. > > I think that the problem is caused by a change in the handling of > POSIX::strftime regarding the internal utf8 flag, probably since perl > 5.22.0. Maybe the problem may be fixed for newer perls by calling > > binmode(..., ':utf8) > > (not tested), but I fear that it will then appear broken for older > perls. > > Another possible fix is to not use a localized date, but something > close to ISO8601, e.g. like this: > > <div id="footer">Generated by [% formatter.class %] v[% > formatter.version %] @ [% USE date %][% date.format(date.now, "%F %T") > %]</div>
I created a PR which changes the date format: https://github.com/spurkis/TAP-Formatter-HTML/pull/6