Handle common charset error

This commit is contained in:
M66B 2022-01-05 20:41:38 +01:00
parent 6916d539ca
commit 8fd3426ea4
1 changed files with 3 additions and 0 deletions

View File

@ -87,6 +87,9 @@ public class UnknownCharsetProvider extends CharsetProvider {
"unknown-8bit".equalsIgnoreCase(name))
return StandardCharsets.ISO_8859_1;
if (name.contains("1252"))
name = "windows-1252";
// Android will prevent recursion
String jname = MimeUtility.javaCharset(name);
return Charset.forName(jname);