mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-26 09:47:13 +00:00
Disabled UTF-7 detection
This commit is contained in:
parent
bbb0f49bcc
commit
9fabfaf978
1 changed files with 3 additions and 1 deletions
|
@ -42,7 +42,7 @@ public class CharsetHelper {
|
||||||
"US-ASCII",
|
"US-ASCII",
|
||||||
"ISO-8859-1", "ISO-8859-2", "ISO-8859-3", "ISO-8859-7",
|
"ISO-8859-1", "ISO-8859-2", "ISO-8859-3", "ISO-8859-7",
|
||||||
"windows-1250", "windows-1251", "windows-1252", "windows-1255", "windows-1256", "windows-1257",
|
"windows-1250", "windows-1251", "windows-1252", "windows-1255", "windows-1256", "windows-1257",
|
||||||
"UTF-7", "UTF-8"
|
"UTF-8"
|
||||||
));
|
));
|
||||||
private static final List<String> LESS_COMMON = Collections.unmodifiableList(Arrays.asList(
|
private static final List<String> LESS_COMMON = Collections.unmodifiableList(Arrays.asList(
|
||||||
"GBK", "GB2312", "HZ-GB-2312",
|
"GBK", "GB2312", "HZ-GB-2312",
|
||||||
|
@ -244,6 +244,8 @@ public class CharsetHelper {
|
||||||
return null;
|
return null;
|
||||||
} else if (COMMON.contains(detected.charset) || LESS_COMMON.contains(detected.charset))
|
} else if (COMMON.contains(detected.charset) || LESS_COMMON.contains(detected.charset))
|
||||||
Log.w("compact_enc_det result=" + detected);
|
Log.w("compact_enc_det result=" + detected);
|
||||||
|
else if ("UTF-7".equals(detected.charset))
|
||||||
|
return null;
|
||||||
else if ("GB18030".equals(detected.charset)) {
|
else if ("GB18030".equals(detected.charset)) {
|
||||||
boolean chinese = Locale.getDefault().getLanguage().equals(CHINESE);
|
boolean chinese = Locale.getDefault().getLanguage().equals(CHINESE);
|
||||||
// https://github.com/google/compact_enc_det/issues/8
|
// https://github.com/google/compact_enc_det/issues/8
|
||||||
|
|
Loading…
Reference in a new issue