mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 11:42:16 -05:00
Avoid IllegalArgumentException for Charset.forName(null).
This commit is contained in:
parent
203dab5c64
commit
da34a5ec8c
@ -101,7 +101,12 @@ public class MimeHeader {
|
||||
String v = field.value;
|
||||
|
||||
if (hasToBeEncoded(v)) {
|
||||
v = EncoderUtil.encodeEncodedWord(field.value, Charset.forName(mCharset));
|
||||
Charset charset = null;
|
||||
|
||||
if (mCharset != null) {
|
||||
charset = Charset.forName(mCharset);
|
||||
}
|
||||
v = EncoderUtil.encodeEncodedWord(field.value, charset);
|
||||
}
|
||||
|
||||
writer.write(field.name + ": " + v + "\r\n");
|
||||
|
Loading…
Reference in New Issue
Block a user