1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-03 13:44:40 +00:00

Small improvement

This commit is contained in:
M66B 2020-01-30 21:42:37 +01:00
parent b0ecc85dda
commit fd497698ab

View file

@ -45,6 +45,7 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;
import java.nio.charset.IllegalCharsetNameException;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
@ -1259,7 +1260,14 @@ public class MessageHelper {
charset = charset.replace("\"", "");
charset = MimeUtility.javaCharset(charset);
if (!Charset.isSupported(charset)) {
boolean supported = false;
try {
supported = Charset.isSupported(charset);
} catch (IllegalCharsetNameException ex) {
Log.e(charset, ex);
}
if (!supported) {
// x-binaryenc
// UseInqueCodePage
// none