mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-12 20:13:45 +02:00
Workaround for HTML UTF-8 that is ISO8859-1
This commit is contained in:
@@ -1471,9 +1471,12 @@ public class MessageHelper {
|
||||
if (!TextUtils.isEmpty(charset))
|
||||
try {
|
||||
Log.i("Charset=" + meta);
|
||||
Charset c = Charset.forName(charset);
|
||||
if (c.equals(StandardCharsets.UTF_8) && !Helper.isUTF8(result))
|
||||
break;
|
||||
result = new String(result.getBytes(StandardCharsets.ISO_8859_1), charset);
|
||||
break;
|
||||
} catch (UnsupportedEncodingException ex) {
|
||||
} catch (Throwable ex) {
|
||||
Log.w(ex);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user