commit 4231a70: [Minor] Use ucnv_getCanonicalName instead of ucnv_getStandardName
Vsevolod Stakhov
vsevolod at highsecure.ru
Tue Nov 19 16:56:06 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-11-19 16:50:50 +0000
URL: https://github.com/rspamd/rspamd/commit/4231a70cc7e5588ecbcefdcab39f0efd8c3be158 (HEAD -> master)
[Minor] Use ucnv_getCanonicalName instead of ucnv_getStandardName
---
src/libmime/mime_encoding.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/libmime/mime_encoding.c b/src/libmime/mime_encoding.c
index 7ef492f9d..4ddba8ca0 100644
--- a/src/libmime/mime_encoding.c
+++ b/src/libmime/mime_encoding.c
@@ -284,25 +284,25 @@ rspamd_mime_detect_charset (const rspamd_ftok_t *in, rspamd_mempool_t *pool)
s = g_hash_table_lookup (sub_hash, ret);
if (s) {
- return ucnv_getStandardName (s->canon, "IANA", &uc_err);
+ return ucnv_getCanonicalName (s->canon, "MIME", &uc_err);
}
/* Just fucking stupid */
- cset = ucnv_getStandardName (ret, "IANA", &uc_err);
+ cset = ucnv_getCanonicalName (ret, "MIME", &uc_err);
if (cset == NULL) {
uc_err = U_ZERO_ERROR;
- cset = ucnv_getStandardName (ret, "MIME", &uc_err);
+ cset = ucnv_getCanonicalName (ret, "IANA", &uc_err);
}
if (cset == NULL) {
uc_err = U_ZERO_ERROR;
- cset = ucnv_getStandardName (ret, "WINDOWS", &uc_err);
+ cset = ucnv_getCanonicalName (ret, "WINDOWS", &uc_err);
}
if (cset == NULL) {
uc_err = U_ZERO_ERROR;
- cset = ucnv_getStandardName (ret, "JAVA", &uc_err);
+ cset = ucnv_getCanonicalName (ret, "JAVA", &uc_err);
}
return cset;
More information about the Commits
mailing list