Recently i have follow the Sun online guide on Java Mail API to send email, download email and download attachment. When comes to extracting attachment from an email, my code looks very similar to this post http://stackoverflow.com/questions/1748183/download-attachments-using-java-mail
However, i encounter a problem when the user send the email attachment file name with vietnamese character, something like this: hệ thống thông.xls
When the code tries to get the filename with: bodyPart.getFileName() , the return file name is like this: h? th?ng =?iso-8859-1?b?dGj0bmcueGxz?=
I have try the following but without any luck
1) set Java VM parameter: -Dfile.encoding=UTF-8
2) try to look further into the Java Mail API on UTF-8 Character support, but cant find any
Any hint will help. Thank you!