Java
rose on Mar 12th 2010 07:29 am edit
I am using Java mail 1.3.1 in JDK 1.2
When I read email attachments, I get attachment names like below:
"=?windows-1254?Q?myfile=2Ejpg?=" for "myfile.jpg"
I use javax.mail.internet.MimeBodyPart's getFileName method.
How can I remove this encoding, I tried java.net.URLDecoder
but doesn't work?
They don't use java mail. Somehow I have to remove extra characters. I don't want to write my own decoder if one is already there.
When we read this email in Lotus, attatchments are properly named which
is in my example "myfile.jpg". I nedd to remove and convert other characters.
javax.mail.internet.MimeUtility.decodeText(field.g etValue());
but with java 1.3.1 most of the encodings used nowadays are not supported! Update to at least 1.4.1 recommend 5
#If you have any other info about this subject , Please add it free.# |
Filed in enart.5isou.com |