diff --git a/src/com/fsck/k9/mail/internet/MimeHeader.java b/src/com/fsck/k9/mail/internet/MimeHeader.java index 68f4e334f..0b205527f 100644 --- a/src/com/fsck/k9/mail/internet/MimeHeader.java +++ b/src/com/fsck/k9/mail/internet/MimeHeader.java @@ -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");