This content has been marked as final.
Show 3 replies
-
1. Re: m:subject always HTML encodes strings
jjarkko Sep 30, 2007 10:41 PM (in response to jjarkko)Ups, forgot to tell that org.jboss.seam.mail.ui.context.MailResponseWriter write method uses the delegate (which happens to be org.apache.myfaces.shared_impl.renderkit.html.HtmlResponseWriterImpl ) for both plain and html outputs.
@Override public void write(String str) throws IOException { if (TEXT_PLAIN_CONTENT_TYPE.equals(getContentType())) { delegate.write(str); } else { delegate.write(str); } }
-
2. Re: m:subject always HTML encodes strings
jjarkko Sep 30, 2007 10:58 PM (in response to jjarkko)FaceletsRendered$Context.wrap() calls facesContext.setResponseWriter with null character encoding. This causes HtmlRenderKitImpl.createResponseWriter to default to ISO-8859-1 encoding which further causes the usage of UnicodeEncoder (delegate.write(String) in MailResponseWriter.write(String)) later on which translates äää -->
// Wrap the ResponseWriter originalResponseWriter = facesContext.getResponseWriter(); facesContext.setResponseWriter(facesContext.getRenderKit().createResponseWriter(writer, null, null));
Class org.apache.myfaces.shared_impl.renderkit.html.HtmlResponseWriterImpl.java: public void write(String str) throws IOException { closeStartTagIfNecessary(); // empty string commonly used to force the start tag to be closed. // in such case, do not call down the writer chain if (str.length() > 0) { // Don't bother encoding anything if chosen character encoding is UTF-8 if (UTF8.equals(_characterEncoding)) _writer.write(str); else _writer.write(UnicodeEncoder.encode(str) ); } }
-
3. Re: m:subject always HTML encodes strings
pmuir Oct 1, 2007 8:12 AM (in response to jjarkko)Please file a JIRA issue for this.