Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localized date does not have utf-8 flag #61

Open
Yenya opened this issue Oct 21, 2022 · 2 comments
Open

Localized date does not have utf-8 flag #61

Yenya opened this issue Oct 21, 2022 · 2 comments

Comments

@Yenya
Copy link

Yenya commented Oct 21, 2022

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

@FGasper
Copy link

FGasper commented Nov 1, 2022

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.

@FGasper
Copy link

FGasper commented Nov 1, 2022

Notably, both seem to behave the same in a non-UTF-8 locale (e.g., ru_RU.koi8r).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants