Move KOI8-U -> KOI8-R fixup to charset fall-back table
This commit is contained in:
parent
4b42d0e062
commit
0319ee4a5d
1 changed files with 2 additions and 2 deletions
|
@ -912,6 +912,8 @@ public class MimeUtility {
|
||||||
* Table format: unsupported charset (regular expression), fall-back charset
|
* Table format: unsupported charset (regular expression), fall-back charset
|
||||||
*/
|
*/
|
||||||
private static final String[][] CHARSET_FALLBACK_MAP = new String[][] {
|
private static final String[][] CHARSET_FALLBACK_MAP = new String[][] {
|
||||||
|
// Some Android versions don't support KOI8-U
|
||||||
|
{"koi8-u", "koi8-r"},
|
||||||
{"iso-2022-jp-[\\d]+", "iso-2022-jp"},
|
{"iso-2022-jp-[\\d]+", "iso-2022-jp"},
|
||||||
// Default fall-back is US-ASCII
|
// Default fall-back is US-ASCII
|
||||||
{".*", "US-ASCII"}
|
{".*", "US-ASCII"}
|
||||||
|
@ -2185,8 +2187,6 @@ public class MimeUtility {
|
||||||
charset = charset.toLowerCase(Locale.US);
|
charset = charset.toLowerCase(Locale.US);
|
||||||
if (charset.equals("cp932"))
|
if (charset.equals("cp932"))
|
||||||
charset = "shift_jis";
|
charset = "shift_jis";
|
||||||
else if (charset.equals("koi8-u"))
|
|
||||||
charset = "koi8-r";
|
|
||||||
|
|
||||||
if (charset.equals("shift_jis") || charset.equals("iso-2022-jp")) {
|
if (charset.equals("shift_jis") || charset.equals("iso-2022-jp")) {
|
||||||
String variant = getJisVariantFromMessage(message);
|
String variant = getJisVariantFromMessage(message);
|
||||||
|
|
Loading…
Reference in a new issue