diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-11-18 21:17:20 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-11-18 21:17:20 +0000 |
commit | 8208b97c7ab0b4b2c0db5fd5ff90048657d605f8 (patch) | |
tree | d17219bb578cfcd0aff16c42229c3f7768960ae3 /src/libmime/mime_encoding.c | |
parent | 452541a054bc36557d847f7b9bfe70d4442eccf1 (diff) | |
download | rspamd-8208b97c7ab0b4b2c0db5fd5ff90048657d605f8.tar.gz rspamd-8208b97c7ab0b4b2c0db5fd5ff90048657d605f8.zip |
[Minor] Check for some more aliases, sigh
Diffstat (limited to 'src/libmime/mime_encoding.c')
-rw-r--r-- | src/libmime/mime_encoding.c | 12 |
1 files changed, 12 insertions, 0 deletions
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; } |