http://qs1969.pair.com?node_id=1186975


in reply to Read (sysread) binary data into utf8 string

Maybe there's a problem in Compress::Zlib. Inconsistency, at least

use strict; use warnings; use feature 'say'; use utf8; use Compress::Zlib; my ( $a, $b, $c, $d, $i ); $a = $b = $c = $d = compress( 'foo' ); utf8::upgrade( $c ); utf8::upgrade( $d ); say 'ok' if $a eq $d; say uncompress( $a ); say uncompress( $c ); $, = ' '; $i = Compress::Zlib::inflateInit(); say $i-> inflate( $b ); $i = Compress::Zlib::inflateInit(); say $i-> inflate( $d );
ok foo foo foo stream end data error

P.S. I mean, that's the source of a bug, linked to in OP. Not related to read behavior.