Attempt to fix UTF-8 text sent as US-ASCII

This commit is contained in:
M66B 2019-06-04 18:55:13 +02:00
parent d0d4d15899
commit ffa7a406f0
1 changed files with 2 additions and 0 deletions

View File

@ -866,6 +866,8 @@ public class MessageHelper {
if ("US-ASCII".equals(Charset.forName(charset).name()) &&
!"US-ASCII".equals(charset.toUpperCase()))
warnings.add(context.getString(R.string.title_no_charset, charset));
if (part.isMimeType("text/plain") && "US-ASCII".equals(charset.toUpperCase()))
result = fixUTF8(result);
}
} catch (ParseException ex) {
Log.w(ex);