in reply to Unicode in bz2 compressed files
perlunitut: Unicode in Perl#Decoding
use Encode; ... while( my $bytesread = $bz->bzreadline(my $line) ){ $bytesread ==-1 and warn sprintf "Error: $bz->bzreadline : %d : %s +", $bz->bzerror, $bz->bzerror; $line = decode('utf8', $line ); ... }
See also perluniintro, Encode...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Unicode in bz2 compressed files
by Anonymous Monk on Sep 05, 2011 at 08:51 UTC |