mirror of https://github.com/M66B/FairEmail.git
Workaround for HTML UTF-8 that is ISO8859-1
This commit is contained in:
parent
74f4ffa7de
commit
1499a1db80
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue