|
|
@ -800,13 +800,11 @@ public class MessageHelper {
|
|
|
|
ContentType ct = new ContentType(part.getContentType());
|
|
|
|
ContentType ct = new ContentType(part.getContentType());
|
|
|
|
String charset = ct.getParameter("charset");
|
|
|
|
String charset = ct.getParameter("charset");
|
|
|
|
|
|
|
|
|
|
|
|
String encoding = null;
|
|
|
|
// Fix common mistakes
|
|
|
|
try {
|
|
|
|
if (charset != null) {
|
|
|
|
String[] enc = part.getHeader("Content-Transfer-Encoding");
|
|
|
|
charset = charset.replace("\"", "");
|
|
|
|
if (enc != null && enc.length > 0)
|
|
|
|
if ("ASCII".equals(charset.toUpperCase()))
|
|
|
|
encoding = enc[0];
|
|
|
|
charset = "us-ascii";
|
|
|
|
} catch (MessagingException ex) {
|
|
|
|
|
|
|
|
Log.w(ex);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (TextUtils.isEmpty(charset) || "US-ASCII".equals(charset.toUpperCase())) {
|
|
|
|
if (TextUtils.isEmpty(charset) || "US-ASCII".equals(charset.toUpperCase())) {
|
|
|
|