Loading src/com/fsck/k9/mail/internet/MimeUtility.java +22 −17 Original line number Diff line number Diff line Loading @@ -907,12 +907,13 @@ public class MimeUtility { }; /** * Table for charset fallback. * Table for character set fall-back. * * Table format: not supported charset (regex), fallback * Table format: unsupported charset (regular expression), fall-back charset */ private static final String[][] CHARSET_FALLBACK_MAP = new String[][] { {"iso-2022-jp-[\\d]+", "iso-2022-jp"}, // Default fall-back is US-ASCII {".*", "US-ASCII"} }; Loading Loading @@ -2312,9 +2313,12 @@ public class MimeUtility { } catch (IllegalCharsetNameException e) { supported = false; } for (String[] rule: CHARSET_FALLBACK_MAP) { if (supported) if (supported) { break; } if (charset.matches(rule[0])) { Log.e(K9.LOG_TAG, "I don't know how to deal with the charset " + charset + ". Falling back to " + rule[1]); Loading @@ -2326,6 +2330,7 @@ public class MimeUtility { } } } /* * Convert and return as new String */ Loading Loading
src/com/fsck/k9/mail/internet/MimeUtility.java +22 −17 Original line number Diff line number Diff line Loading @@ -907,12 +907,13 @@ public class MimeUtility { }; /** * Table for charset fallback. * Table for character set fall-back. * * Table format: not supported charset (regex), fallback * Table format: unsupported charset (regular expression), fall-back charset */ private static final String[][] CHARSET_FALLBACK_MAP = new String[][] { {"iso-2022-jp-[\\d]+", "iso-2022-jp"}, // Default fall-back is US-ASCII {".*", "US-ASCII"} }; Loading Loading @@ -2312,9 +2313,12 @@ public class MimeUtility { } catch (IllegalCharsetNameException e) { supported = false; } for (String[] rule: CHARSET_FALLBACK_MAP) { if (supported) if (supported) { break; } if (charset.matches(rule[0])) { Log.e(K9.LOG_TAG, "I don't know how to deal with the charset " + charset + ". Falling back to " + rule[1]); Loading @@ -2326,6 +2330,7 @@ public class MimeUtility { } } } /* * Convert and return as new String */ Loading