Issue Details (XML | Word | Printable)

Key: EMAIL-14
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: locka
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Commons Email

[email] not support content charset gb2312

Created: 29/Sep/05 04:14 PM   Updated: 22/Feb/07 11:57 PM
Return to search
Component/s: None
Affects Version/s: 1.0
Fix Version/s: 1.1

Time Tracking:
Not Specified

File Attachments:
  Size
Text File commons-email-utf8.patch.txt 2005-10-10 02:48 AM Philip Jacob 1 kB
Java Source File patch.java 2005-12-19 12:15 AM Yoshiyuki Mikami 1 kB
Environment:
Operating System: other
Platform: Other
Issue Links:
Reference
 

Bugzilla Id: 36856
Resolution Date: 22/Feb/07 11:57 PM


 Description  « Hide
when i try the example :
Email email=new SimpleEmail();
email.setHostName("129.1.1.129");
email.setAuthentication("admin","1");
email.addTo("wangjianquan@eastsoft.com.cn", "wjq");
email.setFrom("admin@wjq.com", "Me");
email.setCharset("gb2312");
email.setSubject("²âÊÔ¼òµ¥Óʼþ");
email.setMsg("ÕâÊDzâÊÔ¼òµ¥Óʼþ");
email.send();

the received mail content like "????????????" ,when change Email.TEXT_PLAIN
= "text/plain" to TEXT_PLAIN = "text/plain;charset=gb2312" , all are right



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Philip Jacob added a comment - 10/Oct/05 02:48 AM
Created an attachment (id=16629)
Properly sets the value of setCharset() into the resultant email message

That's a bug. The input to setCharset() is ignored in all cases. I'm trying
to send mail in UTF-8 and I'm having a similar problem as the previous person.

Here's a patch that fixes the problem.


David Eric Pugh added a comment - 16/Oct/05 02:59 AM
From what it looks like, you are basically adding UTF-8 as another charset, correct?

At this point we support thre charsets:
/** */
public static final String KOI8_R = "koi8-r";
/** */
public static final String ISO_8859_1 = "iso-8859-1";
/** */
public static final String US_ASCII = "us-ascii";

I am wondering if there is some sort of master list of charsets we should add. If we have KOI8_R, and
are now adding UTF-8, what other obscure charsets should we take care off?


Yoshiyuki Mikami added a comment - 18/Dec/05 10:55 PM
(In reply to comment #2)
> From what it looks like, you are basically adding UTF-8 as another charset,
correct?
>
> At this point we support thre charsets:
> /** */
> public static final String KOI8_R = "koi8-r";
> /** */
> public static final String ISO_8859_1 = "iso-8859-1";
> /** */
> public static final String US_ASCII = "us-ascii";
>
> I am wondering if there is some sort of master list of charsets we should add.
If we have KOI8_R, and
> are now adding UTF-8, what other obscure charsets should we take care off?

Hello, I'm Japanese.
We usually use "ISO-2022-JP" when using Japanese.
Please add this to list.


Yoshiyuki Mikami added a comment - 19/Dec/05 12:15 AM
Created an attachment (id=17239)
patch for "order fixed calling methods".

Hello Philip,
I applied the patch you made.
But other problem cames up then.
The problem is "order of calling method would be fixed statically".

For example...
1 email.setCharset("gb2312");
2 email.setMsg("foo");
3 email.setCharset("ISO-2022-JP");

In this case, charset "ISO-2022-JP" won't be used. then I tried to make patch
for this problem.

Please check it, and give me some comments.
Thank you.


Henri Yandell made changes - 16/May/06 10:00 AM
Field Original Value New Value
issue.field.bugzillaimportkey 36856 12342587
Henri Yandell made changes - 16/May/06 11:33 AM
Component/s Email [ 12311114 ]
Assignee Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ]
Project Commons [ 12310458 ] Commons Email [ 12310474 ]
Affects Version/s 1.0 Final [ 12311651 ]
Key COM-2435 EMAIL-14
Henri Yandell made changes - 16/May/06 12:09 PM
Affects Version/s 1.0 Final [ 12311731 ]
Ben Speakmon made changes - 10/Jan/07 08:23 PM
Link This issue is related to EMAIL-54 [ EMAIL-54 ]
Ben Speakmon added a comment - 10/Jan/07 08:23 PM
Adding link to related issue.

Ben Speakmon added a comment - 08/Feb/07 07:34 PM
I've submitted a patch for this issue in EMAIL-54.

Henri Yandell made changes - 17/Feb/07 09:52 AM
Fix Version/s 1.1 [ 12312230 ]
dion gillard added a comment - 22/Feb/07 11:57 PM
Fixed by EMAIL-54 patch

dion gillard made changes - 22/Feb/07 11:57 PM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]