[jboss-cvs] jboss-seam/src/mail/org/jboss/seam/mail/ui ...
Peter Muir
peter at bleepbleep.org.uk
Mon Feb 19 12:04:10 EST 2007
User: pmuir
Date: 07/02/19 12:04:10
Modified: src/mail/org/jboss/seam/mail/ui UIBody.java
Log:
Fix null charset
Revision Changes Path
1.8 +19 -4 jboss-seam/src/mail/org/jboss/seam/mail/ui/UIBody.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: UIBody.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/mail/org/jboss/seam/mail/ui/UIBody.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- UIBody.java 9 Feb 2007 20:15:13 -0000 1.7
+++ UIBody.java 19 Feb 2007 17:04:10 -0000 1.8
@@ -86,8 +86,15 @@
{
BodyPart bodyPart = new MimeBodyPart();
bodyPart.setDisposition("inline");
+ if ( facesContext.getResponseWriter().getCharacterEncoding() != null)
+ {
bodyPart.setContent(body, "text/plain; charset="
+ facesContext.getResponseWriter().getCharacterEncoding() + "; format=flowed");
+ }
+ else
+ {
+ bodyPart.setContent(body, "text/plain");
+ }
return bodyPart;
}
@@ -96,8 +103,16 @@
{
BodyPart bodyPart = new MimeBodyPart();
bodyPart.setDisposition("inline");
+ if ( facesContext.getResponseWriter().getCharacterEncoding() != null)
+ {
bodyPart.setContent(body, "text/html; charset="
+ facesContext.getResponseWriter().getCharacterEncoding());
+ }
+ else
+ {
+ bodyPart.setContent(body, "text/html");
+ }
+
return bodyPart;
}
More information about the jboss-cvs-commits
mailing list