pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

gpg/gpg2: problem with locale


I don't know which part is responsible for what. The OS (NetBSD 7.1.1)
or the utility/utilities (gpg2).

When trying to sign with gpg2 a file, using a key created long ago with
gpg, gpg2 was always rejecting the secret pass phrase (while gpg had no
difficulty with it in the same shell session that is the same env).

Suspecting (as usual...) that the locales were in the way, I switched
LC_CTYPE from "fr_FR.ISO8859-15" to "fr_FR.UTF8". Then entering the
secret passphrase to gpg2 (it has a curses interface now BTW and not 
anymore takes from stdin), it worked...

My guess is that gpg-agent (called by gpg2) waits for UTF8 and the
interface does not do the conversion, while, when setting to UTF8, the
system has no choice but to translate keyboard input to UTF-8 before 
passing further the data as bytes. (This is a guess; nothing more.)

If somebody else stumbles on this, this is at least a clue to how to
circumvent the issue.

And if somebody with more knowledge of the inner acrobatics of the
locale can give more than guesses, he will be thanked!

        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C

Home | Main Index | Thread Index | Old Index