Skip to content

avoid "wide character" warning when printing non-ascii sub names - #728

Open
karenetheridge wants to merge 1 commit into
rjbs:mainfrom
karenetheridge:ether/pod-coverage-utf8
Open

avoid "wide character" warning when printing non-ascii sub names#728
karenetheridge wants to merge 1 commit into
rjbs:mainfrom
karenetheridge:ether/pod-coverage-utf8

Conversation

@karenetheridge

Copy link
Copy Markdown
Contributor

@Grinnz

Grinnz commented Mar 11, 2025

Copy link
Copy Markdown
Contributor

I don't think this is the best way to manipulate TAP output which relies on STDOUT, but I suppose it depends how Test::Pod::Coverage works.

@karenetheridge

Copy link
Copy Markdown
Contributor Author

I suppose we could do use Test2::Plugin::UTF8; instead, but that would force Test2 into the distribution -- albeit only for author tests, so maybe that's not a big deal.

@Grinnz

Grinnz commented Mar 11, 2025

Copy link
Copy Markdown
Contributor

True, and it is a core module in recent Perls, but given the complication of injecting dependencies it's probably not worth it here. I would however suggest doing it this way so it is specifically targeted to STDOUT (assuming the relevant characters are in the TAP stream output):

{ use open ':std', OUT => ':encoding(UTF-8)' }

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

Successfully merging this pull request may close these issues.

wrong encoding on filehandle when printing an error

2 participants