MIME4J-295 Allow for overriding the specified charset when decoding q or b encoded...
authorTyler Rockwood <rockwotj@users.noreply.github.com>
Tue, 30 Mar 2021 10:41:35 +0000 (05:41 -0500)
committerGitHub <noreply@github.com>
Tue, 30 Mar 2021 10:41:35 +0000 (17:41 +0700)
commit085d7615bdb8ff64b310a84877f0cc796f239f5d
treede9fcd6a2a3284096fc29be58285068e23c41959
parent4861043e44d34d8cfcf16990720031083792b178
MIME4J-295 Allow for overriding the specified charset when decoding q or b encoded words (#34)

* Allow for overriding the specified charset when decoding q or b encoded words.

It it very common to recieve mislabeled charsets for windows-1252, which usually end up
being ISO-8898-1. This is a minimal change allows our email servers to not have to rewrite
q-encoding, but doesn't change any default behaviors within Mime4J.

* Address review feedback

* Tighten up charset lookup method
core/src/main/java/org/apache/james/mime4j/codec/DecoderUtil.java
core/src/test/java/org/apache/james/mime4j/codec/DecoderUtilTest.java