• CONTEST ALERT - Experience the power of DDR5 memory with Kingston Click for details
Status
Not open for further replies.

Doddy

Broken In
Hi,
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?
 
OP
Doddy

Doddy

Broken In
We are using Lotus. How can I decode this encoding?
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.
 
OP
Doddy

Doddy

Broken In
if I read them in another mail read, outlook or eudora, what will happen then?
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.
 

#/bin/sh

Journeyman
get the headerfields and then use:
javax.mail.internet.MimeUtility.decodeText(field.getValue());

but with java 1.3.1 most of the encodings used nowadays are not supported! Update to at least 1.4.1 recommend 5
 
Status
Not open for further replies.
Top Bottom