commit 4b611bc: [Fix] Return MimeCharset as we work with emails...

Vsevolod Stakhov vsevolod at highsecure.ru
Wed Dec 23 18:28:06 UTC 2020


Author: Vsevolod Stakhov
Date: 2020-12-23 18:24:18 +0000
URL: https://github.com/rspamd/rspamd/commit/4b611bcf5af9d22e24b1842e0ae62fc661955921

[Fix] Return MimeCharset as we work with emails...

---
 contrib/google-ced/ced_c.cc | 2 +-
 contrib/google-ced/ced_c.h  | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/contrib/google-ced/ced_c.cc b/contrib/google-ced/ced_c.cc
index d8f70a87e..51671218b 100644
--- a/contrib/google-ced/ced_c.cc
+++ b/contrib/google-ced/ced_c.cc
@@ -18,7 +18,7 @@ const char* ced_encoding_detect(const char* text, int text_length,
 			ct, ignore_7bit_mail_encodings, bytes_consumed, is_reliable);
 
 	if (IsValidEncoding(enc)) {
-		return EncodingName(enc);
+		return MimeEncodingName(enc);
 	}
 
 	return nullptr;
diff --git a/contrib/google-ced/ced_c.h b/contrib/google-ced/ced_c.h
index c8cb16a2a..c086f0ca1 100644
--- a/contrib/google-ced/ced_c.h
+++ b/contrib/google-ced/ced_c.h
@@ -14,6 +14,9 @@ enum CedTextCorpusType {
 	CED_NUM_CORPA,
 };
 
+/*
+ * XXX: Rspamd addition: it actually returns Mime format of the encoding
+ */
 const char *ced_encoding_detect (const char *text, int text_length,
 								 const char *url_hint,
 								 const char *http_charset_hint,


More information about the Commits mailing list