dcsimg
Multi-byte characters in attachment filename
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Wednesday, February 21, 2007 02:49 AM

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.

Re: Multi-byte characters in attachment filename

Posted By:   Anonymous  
Posted On:   Friday, February 23, 2007 12:58 AM

posting it again...


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.
About | Sitemap | Contact