You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Tino Schöllhorn <t....@plattform-gmbh.de> on 2005/02/08 16:56:42 UTC

[Email] setting charset

Hi,

I think I just stumbled across a bug at the (unreleased) Email 
component. I want to send an Email with:

Email e = new SimpleEmail();
// set some Recipients and Content here
...

// I want to make sure that the following encoding is used.
e.setCharset(Email.ISO_8859_1);
e.send();

Now the thing is, that the set charset is ignored. Actually, when using 
this method the charset is *never* changed because of the implementation 
  of Email.send() which just ignores the charset. Instead one has to use 
the method Email.setContent(Object, String) to make sure the encoding is 
used (though there is a code-block there which should just do that).

I could send a patch for that, but currently I do not know the status 
and the further plans of the Email component. So please let me know if I 
can help out here.

With regards
Tino




---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [Email] setting charset

Posted by Joe Germuska <Jo...@Germuska.com>.
At 4:56 PM +0100 2/8/05, Tino Schöllhorn wrote:
>Hi,
>
>I think I just stumbled across a bug at the 
>(unreleased) Email component. I want to send an 
>Email with:
>
>Email e = new SimpleEmail();
>// set some Recipients and Content here
>...
>
>// I want to make sure that the following encoding is used.
>e.setCharset(Email.ISO_8859_1);
>e.send();
>
>Now the thing is, that the set charset is 
>ignored. Actually, when using this method the 
>charset is *never* changed because of the 
>implementation  of Email.send() which just 
>ignores the charset. Instead one has to use the 
>method Email.setContent(Object, String) to make 
>sure the encoding is used (though there is a 
>code-block there which should just do that).
>
>I could send a patch for that, but currently I 
>do not know the status and the further plans of 
>the Email component. So please let me know if I 
>can help out here.

By all means, file an issue in Bugzilla, and attach a patch.

I don't have time to roll a release, but I have time to apply a patch.

Joe

-- 
Joe Germuska            
Joe@Germuska.com  
http://blog.germuska.com    
"Narrow minds are weapons made for mass destruction"  -The Ex

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org