diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-12-28 07:53:42 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-12-28 07:53:42 +0000 |
commit | ec439ea252e82a6500bbc589d09599ce8db46fdf (patch) | |
tree | a970d922285b990e4a41fc4a656fdbe4a1c18ec6 /src/libmime/mime_encoding.c | |
parent | ea9c335c147f399f8be874f7019fc395a71cf902 (diff) | |
download | rspamd-ec439ea252e82a6500bbc589d09599ce8db46fdf.tar.gz rspamd-ec439ea252e82a6500bbc589d09599ce8db46fdf.zip |
[Feature] Core: Detect charset in archived files
Diffstat (limited to 'src/libmime/mime_encoding.c')
-rw-r--r-- | src/libmime/mime_encoding.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libmime/mime_encoding.c b/src/libmime/mime_encoding.c index d7ac5d416..213817747 100644 --- a/src/libmime/mime_encoding.c +++ b/src/libmime/mime_encoding.c @@ -98,7 +98,7 @@ rspamd_converter_dtor (gpointer p) g_free (c); } -static int32_t +int32_t rspamd_converter_to_uchars (struct rspamd_charset_converter *cnv, UChar *dest, int32_t destCapacity, @@ -132,7 +132,7 @@ rspamd_converter_to_uchars (struct rspamd_charset_converter *cnv, } -static struct rspamd_charset_converter * +struct rspamd_charset_converter * rspamd_mime_get_converter_cached (const gchar *enc, UErrorCode *err) { const gchar *canon_name; @@ -497,8 +497,8 @@ rspamd_mime_charset_utf_enforce (gchar *in, gsize len) } } -static const char * -rspamd_mime_charset_find_by_content (gchar *in, gsize inlen) +const char * +rspamd_mime_charset_find_by_content (const gchar *in, gsize inlen) { static UCharsetDetector *csd; const UCharsetMatch **csm, *sel = NULL; @@ -524,7 +524,7 @@ rspamd_mime_charset_find_by_content (gchar *in, gsize inlen) detect: ucsdet_setText (csd, in, inlen, &uc_err); - csm = ucsdet_detectAll(csd, &matches, &uc_err); + csm = ucsdet_detectAll (csd, &matches, &uc_err); for (i = 0; i < matches; i ++) { if ((conf = ucsdet_getConfidence (csm[i], &uc_err)) > max_conf) { |