From be09028110814b8065ec67bd4e4ed695bdd66a65 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 19 Jul 2023 13:30:41 +0200 Subject: [PATCH] Optimization --- .../main/java/eu/faircode/email/MessageHelper.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/MessageHelper.java b/app/src/main/java/eu/faircode/email/MessageHelper.java index 37f0b169b1..7710e35ec0 100644 --- a/app/src/main/java/eu/faircode/email/MessageHelper.java +++ b/app/src/main/java/eu/faircode/email/MessageHelper.java @@ -3848,13 +3848,13 @@ public class MessageHelper { // - ISO-8859-1 / windows-1252 // - US-ASCII / windows-1250, windows-1252, ISO-8859-1, ISO-8859-15, UTF-8 - //if (StandardCharsets.US_ASCII.equals(detected) && - // ("ISO-8859-15".equals(c.name()) || - // "windows-1250".equals(c.name()) || - // "windows-1252".equals(c.name()) || - // StandardCharsets.UTF_8.equals(c) || - // StandardCharsets.ISO_8859_1.equals(c))) - // break; + if (StandardCharsets.US_ASCII.equals(detected) && + ("ISO-8859-15".equals(c.name()) || + "windows-1250".equals(c.name()) || + "windows-1252".equals(c.name()) || + StandardCharsets.UTF_8.equals(c) || + StandardCharsets.ISO_8859_1.equals(c))) + break; // Convert Log.w("Converting detected=" + detected + " meta=" + c);