|
Created an attachment (id=17778)
This is the new Charset class Hmmm. JDK 14 introduced a java.nio.Charset class. Is that usable?
(In reply to comment #3)
> Hmmm. JDK 14 introduced a java.nio.Charset class. Is that usable? Yes, Charset would be usable but then we must use JDK 1.4 or above; in If we go with javamail1.3/jdk1.4 then we can also fix easily COM-2527. Maybe we can go directly to commons-email 2.0 breaking API compatibility and
setting new requirements. I think also we should release a 1.0.1 (or 1.1) with fixes committed so far. I've done some work on mail clients and servers with Java in the past – I would strongly recommend moving to JDK 1.4's Charset, as it saves all kinds of headaches like this.
I'm not sure if the current commons-email API could be preserved, so it may be a breaking change reserved for 2.0, but attempts to handle charsets with pre-1.4 tools is a truly Sisyphean task. Releasing a 1.1 with current fixes is a great idea. Adding link to related issue.
Attaching a patch and updated test cases for better charset support.
Applied the charset-support patch. Looks fine.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Patch for email to add method setCharset(Charset aCharset)