7 Replies Latest reply on Nov 4, 2008 9:54 AM by Leiv Hellebo

    Bogus encoding in quoted-printable

    Ramon Vega Newbie
      Hi there,

      I'm experiencing troubles with charset utf8 in quoted-printable encoding.
      All umlauts passed to the view (which actually is an email template),
      get a wrong encoded in the wrong charset (iso8859-1) as soon as they are encoded as quoted-printable.
      Example: können is converted to k=C3=B6nnen
      It looks to me, as if the input is wrongly treated as iso8859-1 while it actually is utf8.

      Any clue, anybody?
        • 2. Re: Bogus encoding in quoted-printable
          Ramon Vega Newbie

          |<?xml version="1.0" encoding="UTF-8"?>
          <m:message charset="UTF-8" 
            <m:from name="no reply" address="no-reply@domain.ext"/>
            <m:to address="#{mailStatAction.email.recipient}"/>
               <h:outputText value="#{mailStatAction.email.textHTML}" escape="false" />
              <f:facet name="alternative">
            <m:attachment value="#{mailStatAction.email.attachmentFile}" contentType="application/x-zip-compressed" fileName="#{mailStatAction.email.attachmentName}" />

          mailStatAction.email.textPlain comes directly out of a message-bundle (utf8)

          • 3. Re: Bogus encoding in quoted-printable
            Pete Muir Master

            Ok, I need an example to reproduce, and an issue in JIRA. Bear in mind that I use a Mac Book with UK settings, so if I need to alter Gmail or Mail.app to show the issue, you need to tell me how ;-)

            • 4. Re: Bogus encoding in quoted-printable
              Ramon Vega Newbie
              Ok, first things first; the properties-file "messages_de.properties" contains:

              f_email_monthly_plain=Wenn Sie diesen Text lesen k\u00F6nnen, aktivieren Sie bitte das HTML-Format.

              this property is read by an action-class (MailStatAction) like this:

              String textPlain = messages.get("f_email_monthly_plain");

              then putted into a helper object:

              m_Email = new statEmail(recipient, subject, textHTML.toString(), textPlain, m_ZipName, attachmentFile);

              and finaly rendered by the template above:


              Is this enough for you or do you need more specific information?

              • 5. Re: Bogus encoding in quoted-printable
                Daniel Wachter Newbie

                Hello Pete

                I opened a new jira for the problem of Ramon (JBSEAM-3636), as we work on the same project.

                Hope this is not a huge bug...


                • 6. Re: Bogus encoding in quoted-printable
                  Leiv Hellebo Newbie

                  Sorry if this is the wrong place to comment, my issue is not with seam mail, but I was just going to post something similarly to the Seam forums, so I'm commenting here:


                  <s:link id="myparam" value="utf8: Ø">
                    <f:param name="utf8Param" value="Ø"/>

                  to an  .xhtml-page results in the link displayed properly HTMLEncoded with &Oslash;.

                  The parameter OTOH is converted as if it was in ISO8859-1 to UTF-8 and ends up: utf8Param=%C3%98&amp;

                  This is so, even when following the advice in the docs 16.1.3 to add a character-encoding-filter,
                  and also adding a meta-tag to the xhtml with http-equiv=Content-Type content=text/html; charset=UTF-8.

                  (Yes, I am randomly looking for a solution to this and am a seam/jsf beginner...)

                  (my environment is Debian Lenny, JBoss 4.3 and 5.0, but I have the same on RHEL5.2 with JBoss 4.2. Seam 2.0.2SP1 and 2.1.0SP1)

                  • 7. Re: Bogus encoding in quoted-printable
                    Leiv Hellebo Newbie

                    Sorry for the noise.

                    useBodyEncodingForURI="true" worked fine, it was just that I was using mod_jk, so I had to add it to the ajp connector as well...

                    Good luck with the real issue :)