With many operations, for example simply encrypting a file using a symmetric
cipher, gpg2 fails if it runs in some non-UTF8 locales when asking for a
passphrase. For example, running
env LANG=sv_SE gpg2 -c file
Will result in these error messages:
pinentry-curses: error converting from UTF-8 to ISO-8859-1: Invalid or
incomplete multibyte or wide character
gpg-agent[15300]: command get_passphrase failed: Operation cancelled
gpg: avbruten av användaren
gpg: fel vid skapandet av lösenmening: Invalid passphrase
gpg: symmetric encryption of `file' failed: Invalid passphrase
It does not seem to happen with all non-UTF-8 locales, only some. I haven't
figured out the pattern. The corresponding UTF-8 locale, like sv_SE.utf8 works
fine.
The environment is a Fedora system, with GnuPG 2.0.1.