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
1 changed files with 4 additions and 0 deletions

View File

@ -3993,6 +3993,10 @@ public class MessageHelper {
}
} else if (h.isMarkdown()) {
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);
} catch (Throwable ex) {
Log.e(ex);