]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Oops, fix more stuff
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 27 Jan 2020 19:25:50 +0000 (19:25 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 27 Jan 2020 19:25:50 +0000 (19:25 +0000)
src/libmime/mime_encoding.c

index 646b31eae1d3dc8df18a3f96043306f12be9aadb..a91447ab6967d3b21c25e3ef8df65c03fb52fe38 100644 (file)
@@ -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;
+                       }
                }
        }