Multi-byte characters in attachment filename

I am retrieving attachments in emails using JavaMail APIs. However, if the attachment filename has multi-byte characters in it, i get ? or something like "=?utf-8?B?5byM5L6I5YaJLmRvYw==?=". I tried-

1. String filename = part.getFileName()

2. String filename = MimeUtility.decodeText(part.getFileName());

3. Setting the system property: System.setProperty("mail.mime.decodefilename", "true");

But none of the methods return correct attachmnet name with japanese characters. Please help.

[520 byte] By [neha_83a] at [2007-11-26 19:34:49]
# 1

#1 should return you the encoded string.

#2 should decode the string and return the correct characters.

If it doesn't, it's probably because the string was improperly

encoded.

#3 should cause #1 to do the same as #2, but you have to set

the property before JavaMail classes are loaded.

bshannona at 2007-7-9 22:08:53 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...