aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-pgp-context.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-04-11 22:02:14 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-04-11 22:02:14 +0800
commit1ca457947eac5004f6af55d0d9a45cdc17790207 (patch)
tree0a021fd0718dc9ba270226d9192d78ab2161f9d3 /camel/camel-pgp-context.c
parent14c14d8dc08e98a62413bdcea0be64506fb8f615 (diff)
downloadgsoc2013-evolution-1ca457947eac5004f6af55d0d9a45cdc17790207.tar
gsoc2013-evolution-1ca457947eac5004f6af55d0d9a45cdc17790207.tar.gz
gsoc2013-evolution-1ca457947eac5004f6af55d0d9a45cdc17790207.tar.bz2
gsoc2013-evolution-1ca457947eac5004f6af55d0d9a45cdc17790207.tar.lz
gsoc2013-evolution-1ca457947eac5004f6af55d0d9a45cdc17790207.tar.xz
gsoc2013-evolution-1ca457947eac5004f6af55d0d9a45cdc17790207.tar.zst
gsoc2013-evolution-1ca457947eac5004f6af55d0d9a45cdc17790207.zip
Use e_utf8_from_locale_string() rather than trying to do it manually since
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. svn path=/trunk/; revision=9236
Diffstat (limited to 'camel/camel-pgp-context.c')
-rw-r--r--camel/camel-pgp-context.c30
1 files changed, 4 insertions, 26 deletions
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);
}