summaryrefslogtreecommitdiffstats
path: root/mutt_idna.c
diff options
context:
space:
mode:
authorAlain Bench <veronatif@free.fr>2007-03-06 18:13:14 -0800
committerAlain Bench <veronatif@free.fr>2007-03-06 18:13:14 -0800
commitbbf8fcd960369f06837d4b809b62b419b3ad1437 (patch)
tree77d939928ff62409bf14e6dbe7d5a1e82308cfa5 /mutt_idna.c
parent4ff78eaef510bd001bd6e517a06e5ec80f37a11b (diff)
Remove buggy usage of M_ICONV_HOOK_TO flag in mutt_idna.c:mutt_idna_to_local().
Wipe unwanted code depending on M_ICONV_HOOK_TO in charset.c:mutt_iconv_open(). Totally wipe M_ICONV_HOOK_TO symbol. Remove misusages of M_ICONV_HOOK_FROM flag in: - crypt-gpgme.c:print_utf8(). - mutt_idna.c:mutt_idna_to_local() and mutt_local_to_idna(). - pgp.c:pgp_traditional_encryptsign(). Document usage policy of M_ICONV_HOOK_FROM flag. Cosmetic downcasing of some constant charset names (utf-8, euc-jp) for consistency. Correction of a typo in the "iso8859-5" charset name.
Diffstat (limited to 'mutt_idna.c')
-rw-r--r--mutt_idna.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/mutt_idna.c b/mutt_idna.c
index 52138b3f..721bf4f0 100644
--- a/mutt_idna.c
+++ b/mutt_idna.c
@@ -55,7 +55,9 @@ int mutt_idna_to_local (const char *in, char **out, int flags)
/* Is this the right function? Interesting effects with some bad identifiers! */
if (idna_to_unicode_8z8z (in, out, 1) != IDNA_SUCCESS)
goto notrans;
- if (mutt_convert_string (out, "utf-8", Charset, M_ICONV_HOOK_TO) == -1)
+
+ /* we don't want charset-hook effects, so we set flags to 0 */
+ if (mutt_convert_string (out, "utf-8", Charset, 0) == -1)
goto notrans;
/*
@@ -68,7 +70,9 @@ int mutt_idna_to_local (const char *in, char **out, int flags)
int irrev = 0;
char *t2 = NULL;
char *tmp = safe_strdup (*out);
- if (mutt_convert_string (&tmp, Charset, "utf-8", M_ICONV_HOOK_FROM) == -1)
+
+ /* we don't want charset-hook effects, so we set flags to 0 */
+ if (mutt_convert_string (&tmp, Charset, "utf-8", 0) == -1)
irrev = 1;
if (!irrev && idna_to_ascii_8z (tmp, &t2, 1) != IDNA_SUCCESS)
irrev = 1;
@@ -106,7 +110,8 @@ int mutt_local_to_idna (const char *in, char **out)
return -1;
}
- if (mutt_convert_string (&tmp, Charset, "utf-8", M_ICONV_HOOK_FROM) == -1)
+ /* we don't want charset-hook effects, so we set flags to 0 */
+ if (mutt_convert_string (&tmp, Charset, "utf-8", 0) == -1)
rv = -1;
if (!rv && idna_to_ascii_8z (tmp, out, 1) != IDNA_SUCCESS)
rv = -2;