mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-09 18:43:23 +02:00
Check ASCII for UTF8 too
This commit is contained in:
@@ -1725,7 +1725,8 @@ public class MessageHelper {
|
||||
warnings.add(context.getString(R.string.title_no_charset, charset));
|
||||
|
||||
if (part.isMimeType("text/plain")) {
|
||||
if (TextUtils.isEmpty(charset) && Helper.isUTF8(result)) {
|
||||
if ((TextUtils.isEmpty(charset) || charset.equalsIgnoreCase(StandardCharsets.US_ASCII.name())) &&
|
||||
Helper.isUTF8(result)) {
|
||||
Log.i("Charset plain=UTF8");
|
||||
result = new String(result.getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user