Fixed MIME decoding

This commit is contained in:
M66B 2019-04-26 13:31:20 +02:00
parent 814cb881c1
commit 8082fffbf7
1 changed files with 5 additions and 1 deletions

View File

@ -698,9 +698,12 @@ public class MessageHelper {
while (s >= 0 && e >= 0 && i < text.length()) {
String decode = text.substring(s, e + 2);
try {
String decoded = MimeUtility.decodeText(decode);
String decoded = MimeUtility.decodeWord(decode);
text = text.substring(0, s) + decoded + text.substring(e + 2);
i += decoded.length();
} catch (ParseException ex) {
Log.w(ex);
i += decode.length();
} catch (UnsupportedEncodingException ex) {
Log.w(ex);
i += decode.length();
@ -708,6 +711,7 @@ public class MessageHelper {
s = text.indexOf("=?", i);
e = text.indexOf("?=", i);
}
return text;
}