From 5225760f530c97de9a459add2586d0982e71c4b2 Mon Sep 17 00:00:00 2001 From: Thomas Roessler Date: Tue, 15 Sep 1998 20:56:34 +0000 Subject: [PATCH] UTF8-decode PGP user ID packets. --- pgppubring.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pgppubring.c b/pgppubring.c index c3499ea6a..087d6d617 100644 --- a/pgppubring.c +++ b/pgppubring.c @@ -26,6 +26,7 @@ #include "sha.h" #include "mutt.h" #include "pgp.h" +#include "charset.h" #define CHUNKSIZE 1024 @@ -726,6 +727,7 @@ static KEYINFO *pgp_read_keyring(const char *fname) KEYINFO *supkey = NULL; PGPUID *uid = NULL; LIST **addr = NULL; + CHARSET *chs = mutt_get_charset(Charset); if(!(fp = fopen(fname, "r"))) { @@ -796,6 +798,7 @@ static KEYINFO *pgp_read_keyring(const char *fname) chr = safe_malloc(l); memcpy(chr, buff + 1, l - 1); chr[l-1] = '\0'; + mutt_decode_utf8_string(chr, chs); *addr = mutt_new_list(); (*addr)->data = safe_malloc(sizeof(PGPUID)); uid = (PGPUID *) (*addr)->data; -- 2.40.0