Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

issue with reading IO::Uncompress:Gunzip and utf-8

by Skeeve (Parson)
on Aug 25, 2020 at 10:24 UTC ( [id://11121073]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    echo ü > umlaut
    gzip -k umlaut
    
  2. or download this
    perl -e '
      use IO::Uncompress::Gunzip;
    ...
      $_=<$gin>;
      print "  Compressed: $_ ",ord($_),"\n";
    '
    
  3. or download this
    perl -e '
      use IO::Uncompress::Gunzip;
    ...
      $_ = Encode::decode("UTF-8", $_);
      print "  Compressed: $_ ",ord($_),"\n";
    '
    
  4. or download this
            my $encoding = ":utf8";
            if ( $filename =~ /\.gz$/ ) {
                $encoding = ":gzip$encoding";
            }
            open $in, "<$encoding", $filename or die "Can't read $filename
    +: $!\n";
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11121073]
Approved by kcott
Front-paged by haukex
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2024-04-26 02:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found