|
Please se attached MailTest.java and message.eml and the resulting email when recieved. You need to put commons-email-1.1.jar and mail-1.4.jar on the classpath to run the test. As you see, the subject is encoded correctly, but the body is qp-encoded with latin-1 charset instead of UTF-8. I ran the program with -Dfile.encoding="UTF-8". It's easy to spot, since the each qp-encoded letter in the body only consist of one encoded one-byte sequence instead of two.
Edvin Syse made changes - 25/Nov/08 08:12 AM
Edvin,
I am not sure this is what you wanted but the changes contained are making the simple (and HTML) email classes utilize the charset and content type settings better than they were. (in some cases they werent being used previously) You still have to do a email.setCharset() call in order to ensure both the subject and message bodies have the encoding set but I personally feel this is acceptable. Perhaps because I dont see how the encoding can be reliably determined dynamically or even if it could, it is in side the scope of this library.
Corey Scott made changes - 27/Nov/08 08:03 AM
Thanks, hopefully that will do the trick! I agree that one cannot always determine the correct encoding, but I think it is reasonable that the same encoding should be used in both subject and body even if you don't supply something explicitely, don't you agree?
That certainly seems logical.
Siegfried Goeschl made changes - 06/Feb/09 06:29 PM
Siegfried Goeschl made changes - 06/Feb/09 06:30 PM
I applied the patch but it is breaking a few tests
testSendNoAttachments(org.apache.commons.mail.SendWithAttachmentsTest) I try to commit my pending changes so that you can have a look at the problems New version of the patch that replaces the earlier one.
Tests against the current trunk are working again.
Corey Scott made changes - 11/Feb/09 04:07 AM
Siegfried Goeschl made changes - 24/Feb/09 11:26 PM
Siegfried Goeschl made changes - 05/Apr/09 08:17 PM
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
I tried looking into this for you and were unable to come up with a test to prove this condition.
Could you please see if you can create one so I can move this forward for you?
Thanks