in reply to Re: decoding a UTF-16B string found in an email subject
in thread decoding a UTF-16B string found in an email subject
thanks the doc for Encode::Mime::Header explained what i was doing wrong
#my $string = "=?UTF-16?B?dwAgAEMAcgBlAGQAaQB0ACAAQwBhAHIAZAAgAEMAbwB1 +AGwAZAAgAEIAZQAgAEgAZQBhAGQAZQBkACAAWQBvAHUAcgAgAFcAYQB5AA==?="; my $string = "dwAgAEMAcgBlAGQAaQB0ACAAQwBhAHIAZAAgAEMAbwB1AGwAZAAgAEIA +ZQAgAEgAZQBhAGQAZQBkACAAWQBvAHUAcgAgAFcAYQB5AA=="; print MIME::Base64::decode( $string ), "\n"; w Credit Card Could Be Headed Your Way
i had to use base64 decoding on the encoded word, and not the whole string
=?encoding?X?ENCODED WORD?=
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: decoding a UTF-16B string found in an email subject
by runrig (Abbot) on Oct 30, 2013 at 20:32 UTC |