-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Description
Describe the bug
Output of parse_string_document method is incorrect when I/O layer is specified in binmode.
To Reproduce
Running this script will display the result of converting a string written in Pod format.
Grinning face emoji is the expected behavior to be displayed, but it is garbled.
If the binmode function call is commented out, the display will be as expected.
use v5.38;
use utf8;
use Pod::Text;
my $doc = <<'EOF';
=encoding utf8
=head1 NAME
😀Grinning face
EOF
binmode STDOUT, ":utf8";
my $p = Pod::Text->new();
$p->parse_string_document($doc);Expected behavior
binmode is not commented out and the grinning face emoji is correctly displayed.
Additional context
It behaved as expected up to v4.14.
It is reproduced in the latest sources since v5.00.
Metadata
Metadata
Assignees
Labels
No labels