in reply to Re^3: MIME::Parser::Filer and filenames in Simplified Chinese
in thread MIME::Parser::Filer and filenames in Simplified Chinese
#!/usr/bin/perl use Encode; use Encode::CN; use Encode::TW; use MIME::EncWords qw ( /decode_mimewords/); binmode STDOUT, ":utf8"; my $text = "=?gb2312?B?RFBNMjAwN2V4Y2hhbmdl64rgXcVj4F3P5NDej80uemlw?=" +; my(@chunks) = decode_mimewords($text); for my $pair (@chunks) { my($data,$encoding) = @$pair; my $filename = Encode::decode($encoding,$data); print $filename . "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: MIME::Parser::Filer and filenames in Simplified Chinese
by uxbod (Initiate) on Nov 21, 2011 at 17:10 UTC | |
|
Re^5: MIME::Parser::Filer and filenames in Simplified Chinese
by uxbod (Initiate) on Nov 21, 2011 at 17:40 UTC | |
by zwon (Abbot) on Nov 22, 2011 at 03:54 UTC |