[jboss-user] [JBoss Seam] - Re: Email and internationalization

rlhr do-not-reply at jboss.com
Thu Apr 12 12:09:14 EDT 2007


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.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036782#4036782

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036782




More information about the jboss-user mailing list