Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Read (sysread) binary data into utf8 string

by vr (Deacon)
on Apr 04, 2017 at 10:21 UTC ( #1186975=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1186975]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2019-12-11 11:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?