|
|
@ -627,7 +627,16 @@ public class MessageHelper {
|
|
|
|
|
|
|
|
|
|
|
|
subject = MimeUtility.unfold(subject);
|
|
|
|
subject = MimeUtility.unfold(subject);
|
|
|
|
|
|
|
|
|
|
|
|
// Fix UTF-8
|
|
|
|
if (subject.contains("=?")) {
|
|
|
|
|
|
|
|
// Decode header
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
subject = MimeUtility.decodeText(subject);
|
|
|
|
|
|
|
|
} catch (UnsupportedEncodingException ex) {
|
|
|
|
|
|
|
|
Log.w(ex);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return decodeMime(subject);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
// Fix UTF-8 plain header
|
|
|
|
char[] kars = subject.toCharArray();
|
|
|
|
char[] kars = subject.toCharArray();
|
|
|
|
byte[] bytes = new byte[kars.length];
|
|
|
|
byte[] bytes = new byte[kars.length];
|
|
|
|
for (int i = 0; i < kars.length; i++)
|
|
|
|
for (int i = 0; i < kars.length; i++)
|
|
|
@ -643,6 +652,7 @@ public class MessageHelper {
|
|
|
|
|
|
|
|
|
|
|
|
return decodeMime(subject);
|
|
|
|
return decodeMime(subject);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Long getSize() throws MessagingException {
|
|
|
|
Long getSize() throws MessagingException {
|
|
|
|
long size = imessage.getSize();
|
|
|
|
long size = imessage.getSize();
|
|
|
|