diff options
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 6 | ||||
-rw-r--r-- | camel/camel-pgp-context.c | 30 |
2 files changed, 10 insertions, 26 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 3cd2dbf8fd..8027680908 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,9 @@ +2001-04-11 Jeffrey Stedfast <fejj@ximian.com> + + * camel-pgp-context.c (camel_pgp_verify): Use + e_utf8_from_locale_string() rather than trying to do it manually + since Lauris's version works much better. + 2001-04-06 Jeffrey Stedfast <fejj@ximian.com> * Makefile.am: Added camel-pgp-context.[c,h] to the build. Also diff --git a/camel/camel-pgp-context.c b/camel/camel-pgp-context.c index 4dad8909b9..53da66390b 100644 --- a/camel/camel-pgp-context.c +++ b/camel/camel-pgp-context.c @@ -31,6 +31,8 @@ #include <gtk/gtk.h> /* for _() macro */ +#include <gal/widgets/e-unicode.h> + #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -50,8 +52,6 @@ #include <unistd.h> #include <signal.h> -#include <iconv.h> - #ifdef ENABLE_THREADS #include <pthread.h> #define PGP_LOCK(ctx) g_mutex_lock (((CamelPgpContext *) ctx)->priv->lock) @@ -1021,31 +1021,9 @@ camel_pgp_verify (CamelPgpContext *context, CamelStream *istream, } if (diagnostics) { - char *charset; - const char *buf; - char *desc, *outbuf; - iconv_t cd; - size_t len, outlen; - - charset = getenv ("CHARSET"); - if (!charset) - charset = "ISO-8859-1"; - - cd = iconv_open ("UTF-8", charset); - - len = strlen (diagnostics); - outlen = 2 * len; - - outbuf = desc = g_malloc0 (outlen + 1); - buf = diagnostics; - if (cd == (iconv_t) -1 || iconv (cd, &buf, &len, &outbuf, &outlen) == -1) { - g_free (desc); - desc = g_strdup (diagnostics); - } - - if (cd != (iconv_t) -1) - iconv_close (cd); + char *desc; + desc = e_utf8_from_locale_string (diagnostics); camel_pgp_validity_set_description (valid, desc); g_free (desc); } |