]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Check for some more aliases, sigh
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 18 Nov 2019 21:17:20 +0000 (21:17 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 18 Nov 2019 21:17:20 +0000 (21:17 +0000)
src/libmime/mime_encoding.c

index f7a244d0cd69f99b65603ee75d53af2848102207..7872fa330a3ef4341bd39fda68f77da8552af214 100644 (file)
@@ -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;
 }