I'm creating email client, when i receive emails from blackberry server it sends file name as "=?utf-8?B?anBlZ2F0dGFjaG1lbnQuSlBFRw==?=" but the original filename was "jpegattachment.JPEG", and sometime I get the plain text when I receive from other mail servers. So here my problem is I can get a string which may or may not be encoded.
Is there any way, I can get the encoding of string and decode that into plain text.
Either the input string is "=?utf-8?B?anBlZ2F0dGFjaG1lbnQuSlBFRw==?=" or "jpegattachment.JPEG" output should be "jpegattachment.JPEG".
Any Idea??