1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-02-23 06:31:17 +00:00

Convert markdown message part to UTF-8

This commit is contained in:
M66B 2024-02-21 07:45:28 +01:00
parent 7f4d3e6a3f
commit ba7db23a5d

View file

@ -3993,6 +3993,10 @@ public class MessageHelper {
} }
} else if (h.isMarkdown()) { } else if (h.isMarkdown()) {
try { try {
if (cs == null ||
StandardCharsets.US_ASCII.equals(cs) ||
StandardCharsets.ISO_8859_1.equals(cs))
result = new String(result.getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8);
result = Markdown.toHtml(result); result = Markdown.toHtml(result);
} catch (Throwable ex) { } catch (Throwable ex) {
Log.e(ex); Log.e(ex);