commit 8208b97: [Minor] Check for some more aliases, sigh
Vsevolod Stakhov
vsevolod at highsecure.ru
Mon Nov 18 21:21:07 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-11-18 21:17:20 +0000
URL: https://github.com/rspamd/rspamd/commit/8208b97c7ab0b4b2c0db5fd5ff90048657d605f8 (HEAD -> master)
[Minor] Check for some more aliases, sigh
---
src/libmime/mime_encoding.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/libmime/mime_encoding.c b/src/libmime/mime_encoding.c
index f7a244d0c..7872fa330 100644
--- a/src/libmime/mime_encoding.c
+++ b/src/libmime/mime_encoding.c
@@ -272,12 +272,24 @@ rspamd_mime_detect_charset (const rspamd_ftok_t *in, rspamd_mempool_t *pool)
return ucnv_getStandardName (s->canon, "IANA", &uc_err);
}
+ /* Just fucking stupid */
cset = ucnv_getStandardName (ret, "IANA", &uc_err);
if (cset == NULL) {
+ uc_err = U_ZERO_ERROR;
cset = ucnv_getStandardName (ret, "MIME", &uc_err);
}
+ if (cset == NULL) {
+ uc_err = U_ZERO_ERROR;
+ cset = ucnv_getStandardName (ret, "WINDOWS", &uc_err);
+ }
+
+ if (cset == NULL) {
+ uc_err = U_ZERO_ERROR;
+ cset = ucnv_getStandardName (ret, "JAVA", &uc_err);
+ }
+
return cset;
}
More information about the Commits
mailing list