From ffa7a406f0e3f97a7446c5bd757030312c0807e9 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 4 Jun 2019 18:55:13 +0200 Subject: [PATCH] Attempt to fix UTF-8 text sent as US-ASCII --- app/src/main/java/eu/faircode/email/MessageHelper.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/MessageHelper.java b/app/src/main/java/eu/faircode/email/MessageHelper.java index 85fc99948f..7a240a5274 100644 --- a/app/src/main/java/eu/faircode/email/MessageHelper.java +++ b/app/src/main/java/eu/faircode/email/MessageHelper.java @@ -866,6 +866,8 @@ public class MessageHelper { if ("US-ASCII".equals(Charset.forName(charset).name()) && !"US-ASCII".equals(charset.toUpperCase())) warnings.add(context.getString(R.string.title_no_charset, charset)); + if (part.isMimeType("text/plain") && "US-ASCII".equals(charset.toUpperCase())) + result = fixUTF8(result); } } catch (ParseException ex) { Log.w(ex);