Uploaded image for project: 'Geronimo'
  1. Geronimo
  2. GERONIMO-4136

Encoding coversion issues with geronimo javamail

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.1.1
    • None
    • mail
    • Security Level: public (Regular issues)
    • None

    Description

      We have a test trying to add a footer to a message using iso-8859-15 charset:

      AddFooterTest.java
          public void testAddFooterTextPlain() throws MessagingException, IOException {
      
              // quoted printable mimemessage text/plain
              String asciisource = "Subject: test\r\nContent-Type: text/plain; charset=ISO-8859-15\r\nMIME-Version: 1.0\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\nTest=E0 and one\r\n";
      
              String iso885915qpheader = "------ my footer =E0/=A4 ------";
              String footer = "------ my footer \u00E0/\u20AC ------";
      
              String res = processAddFooter(asciisource, footer);
      
              assertEquals(asciisource + iso885915qpheader, res);
      
          }
      

      the result (using geronimo javamail) have an =80 instead of =A4 in the footer, meaning it probably used the cp1252 charset instead of the iso-8859-15 declared in the message header.

      processAddFooter(asciisource, footer) create a JAMES Mail object from sources and then runs it through the AddFooter mailet.

      The test has 4-5 dependencies and probably is not too hard to be run outside james:
      http://svn.apache.org/repos/asf/james/server/trunk/phoenix-deployment/src/test/org/apache/james/transport/mailets/AddFooterTest.java

      Attachments

        1. TestAddFooter.java
          2 kB
          Richard McGuire

        Issue Links

          Activity

            People

              rickmcguire Richard McGuire
              bago Stefano Bagnara
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: