in reply to decoding a UTF-16B string found in an email subject

The headers are base64 encoded so this gets you better jibberish anyway–

perl -CSD -MEncode -MMIME::Base64 -le 'print decode"UTF-16be", decode_base64"Subject: bobbypin22, A Ne=?UTF-16?B?dwAgAEMAcgBlAGQAaQB0ACAAQwBhAHIAZAAgAEMAbwB1AGwAZAAgAEIAZQAgAEgAZQBhAGQAZQBkACAAWQBvAHUAcgAgAFcAYQB5AA==?="'
䫦쭛ꆶ⧶�

You'll have to play around with the encoding stuff maybe but the MIME::Base64 is probably all you're missing.

Update, looking at it more, it seems that it is doing something with the encoding I'm not familiar with… (embedded UTF-16?B stuff). So, someone will probably give a better answer, or I'll look more in a couple hours.

That string on it's own looks like possibly clean Chinese when decoded (I don't read any so, uh, hope it's not echoed spam)–

眀 䌀爀攀搀椀琀 䌀愀爀搀 䌀漀甀氀搀 䈀攀 䠀攀愀搀攀搀 夀漀甀爀 圀愀礀

Replies are listed 'Best First'.
Re^2: decoding a UTF-16B string found in an email subject
by Laurent_R (Canon) on Oct 30, 2013 at 20:01 UTC

    When I first saw the post, I also thought it might look like Base64 encoding, but, trying to decode it, I could not make anything out of its decoding, so I gave up and did not answer. So, if I understand correctly, it is Base64 + Chinese UTF16, did I get it right?

Re^2: decoding a UTF-16B string found in an email subject
by neaj (Initiate) on Oct 30, 2013 at 19:27 UTC

    it's actually english, as i can see the mail on the webserver all decoded and pretty like.

    it is in fact spam, which i echoed the subject line in my question above, but just to show what the line should be when decoded

    and thanks for looking. i'll see where MIME::Base64 leads me

      What skx says is more on point. But it doesn't work as is. Doing decode "MIME-Header" on it gets–

      UTF-16:Unrecognised BOM 7700