aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-01-27 19:25:50 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-01-27 19:25:50 +0000
commit58b5048924664bd913b0b275e61dea9a088b17e7 (patch)
tree4613762a15addd2d8e8a2c1e679833076e639d64
parentf36e220f91335ccdfbff489f5531c4325236a8e9 (diff)
downloadrspamd-58b5048924664bd913b0b275e61dea9a088b17e7.tar.gz
rspamd-58b5048924664bd913b0b275e61dea9a088b17e7.zip
[Minor] Oops, fix more stuff
-rw-r--r--src/libmime/mime_encoding.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/libmime/mime_encoding.c b/src/libmime/mime_encoding.c
index 646b31eae..a91447ab6 100644
--- a/src/libmime/mime_encoding.c
+++ b/src/libmime/mime_encoding.c
@@ -724,10 +724,15 @@ rspamd_mime_text_part_maybe_convert (struct rspamd_task *task,
}
}
else {
- /*
- * We have detected some charset, but we don't know which one
- */
- valid_utf8 = FALSE;
+ text_part->real_charset = charset;
+
+ if (strcmp (charset, UTF8_CHARSET) != 0) {
+ /*
+ * We have detected some charset, but we don't know which one,
+ * so we need to reset valid utf8 flag and enforce it later
+ */
+ valid_utf8 = FALSE;
+ }
}
}