1 2 Previous Next 19 Replies Latest reply on Apr 16, 2007 4:49 PM by rlhr Go to original post
      • 15. Re: Email and internationalization
        pmuir

        Can you file an issue in JIRA and if possible add a testcase? Thanks

        • 16. Re: Email and internationalization

          So after a little debugging, it seems that the problems lies in the UISubject.encodeChildren method.

           @Override
           public void encodeChildren(FacesContext facesContext) throws IOException
           {
           try
           {
           String subject = encode(facesContext, MailResponseWriter.TEXT_PLAIN_CONTENT_TYPE);
           String charset = findMessage().getCharset();
           if (charset == null)
           {
           findMimeMessage().setSubject(subject);
           }
           else
           {
           findMimeMessage().setSubject(subject, charset);
           }
           }
           catch (MessagingException e)
           {
           throw new FacesException(e.getMessage(), e);
           }
           }
          


          I think the problem lies in line 21. The encode method returns "Caf& #233;" instead of "Café"
          In line 29, findMimeMessage().setSubject(subject, charset) get the charset properly.


          I didn't debug further into the MailComponent.encode method.

          I will set a small example and file an issue.


          • 17. Re: Email and internationalization
            • 18. Re: Email and internationalization
              tazman

              Thanks Pete! With your latest CVS commits I now have all the email functionality I need. I can send sync/async mails, and the subject and body parts are correctly encoded in utf-8.

              Thanks again!

              tazman

              • 19. Re: Email and internationalization

                Using JBoss AS 4.2 CR1 fixed the problem :)

                1 2 Previous Next