Open Yenya opened 2 years ago
I doubt this can be changed since it would break applications that depend on the current behaviour.
It probably just needs to be documented: whereas POSIX::strftime() returns characters, this module’s strftime() returns bytes.
Notably, both seem to behave the same in a non-UTF-8 locale (e.g., ru_RU.koi8r
).
TIme::Piece->strftime() does not return UTF-8 data, unlike POSIX::strftime(). I think it should behave the same way.
Proof of concept code, run with LC_TIME=cs_CZ.UTF-8, ja_JP.UTF-8 or any other locale which uses non-ascii leters in month names:
strftime.pl.txt
This is probably related to https://rt.cpan.org/Public/Bug/Display.html?id=97539