Workaround for HTML UTF-8 that is ISO8859-1

pull/177/head
M66B 5 years ago
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…
Cancel
Save