pmqs / IO-Compress

IO-Compress - Perl5 module to read/write compressed data in multiple formats
14 stars 16 forks source link

How to set encoding utf8 layer? #48

Open vitalysennikov opened 1 year ago

vitalysennikov commented 1 year ago

This code don't work for me:

$fh = IO::Uncompress::Gunzip->new($fname);
$fh->binmode(":encoding(utf8)");

The same code for IO::File works fine. What I have to do, that this work for IO::Uncompress::Gunzip? Now I am forced to utf8::decode() the read data. Can you help me please?

pmqs commented 1 year ago

Hey @vitalysennikov

at present there isn't support for encoding/decoding in the IO::Uncompress::* modules. You have to do it in two steps.