diff --git a/app/src/main/java/eu/faircode/email/UnknownCharsetProvider.java b/app/src/main/java/eu/faircode/email/UnknownCharsetProvider.java index 1fcba6c4cf..ee3e1b4fa3 100644 --- a/app/src/main/java/eu/faircode/email/UnknownCharsetProvider.java +++ b/app/src/main/java/eu/faircode/email/UnknownCharsetProvider.java @@ -57,14 +57,14 @@ public class UnknownCharsetProvider extends CharsetProvider { name = name.replace("\"", ""); - // WİNDOWS-1254 - name = Normalizer.normalize(name, Normalizer.Form.NFKD) - .replaceAll("[^\\p{ASCII}]", ""); - int sp = name.indexOf(" "); if (sp > 0) name = name.substring(0, sp); + // WİNDOWS-1254 + name = Normalizer.normalize(name, Normalizer.Form.NFKD) + .replaceAll("[^\\p{ASCII}]", ""); + name = name.trim().toUpperCase(); if (name.contains("UTF8") || name.contains("UTF-8")) // //TRANSLIT