From b98c3fbd4a37ec366ff35eab4fb41785d63c9407 Mon Sep 17 00:00:00 2001 From: Markus Braun Date: Tue, 5 Jul 2011 08:57:47 +0200 Subject: [PATCH] Convert the output of gpg to the correct encoding. --- plugin/gnupg.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/plugin/gnupg.vim b/plugin/gnupg.vim index e0b8f51..bcc94a6 100644 --- a/plugin/gnupg.vim +++ b/plugin/gnupg.vim @@ -839,6 +839,12 @@ fun s:GPGNameToID(name) let &shellredir=s:shellredirsave let &shell=s:shellsave + " when called with "--with-colons" gpg encodes its output _ALWAYS_ as UTF-8, + " so convert it, if necessary + if &encoding != "utf-8" + let output=iconv(output, "utf-8", &encoding) + endi + " parse the output of gpg let pub_seen=0 let uid_seen=0 @@ -903,6 +909,12 @@ fun s:GPGIDToName(identity) let &shellredir=s:shellredirsave let &shell=s:shellsave + " when called with "--with-colons" gpg encodes its output _ALWAYS_ as UTF-8, + " so convert it, if necessary + if &encoding != "utf-8" + let output=iconv(output, "utf-8", &encoding) + endi + " parse the output of gpg let pub_seen=0 let finish=0