Java

rose on Mar 12th 2010 07:29 am edit

  • 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?


  • what if you read them in another mail read, outlook or eudora for example?


  • 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.


  • 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.


  • get the headerfields and then use:
    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


  • Think you'll need to determine the encoding used by whatever created the email.







  • #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Java , Please add it free.

    Filed in enart.5isou.com |