Re: Different locale for pinentry

Klaus Ethgen <[email protected]> Mon, 6 Apr 2026 18:32:51 +0100
Newsgroups gmane.comp.encryption.gpg.user
Message-ID <adPuQ72R2acho9tK@chil>
By the way, I checked the log file that should have utf8 strings but
there is latin1: "command 'PKDECRYPT' failed: Kein geheimer Schlüssel"
(see the "ü").

So for some reasons, that switch to utf8 is not working or reverted.

I do not know the code good enough, but I checked and found some
i18n_switchto_utf8/i18n_switchback somewhere in he gpg-agent dir.
However, that looks quite reasonable for me.

The only difference I find is that all the code uses "utf-8" but
gpg-agent uses "UTF-8". Could it be that this codeset is case sensitive?

You even have the following comment:
      { /* We only switch when we are able to restore the codeset later.
           Note that bind_textdomain_codeset does only return on memory
           errors but not if a codeset is not available.  Thus we don't
           bother printing a diagnostic here. */

So I am afraid that it is just ignoring that UTF-8. But I would not bet
for it.

Would it be possible to check after setting it if the codeset is equal?

Something like:
char *orig_codeset = bind_textdomain_codeset(PACKAGE_GT, NULL);
if (!strcmp(orig_codeset, "UTF-8"))
{
   log_info(_("WARNING: \"%s\" is not equal to UTF-8\n"), orig_codeset);
}

Regards
   Klaus
-- 
Klaus Ethgen                                       http://www.ethgen.ch/
pub  4096R/4E20AF1C 2011-05-16            Klaus Ethgen <[email protected]>
Fingerprint: 85D4 CA42 952C 949B 1753  62B3 79D0 B06F 4E20 AF1C

_______________________________________________
Gnupg-users mailing list
[email protected]
https://lists.gnupg.org/mailman/listinfo/gnupg-users
signature.asc (application/pgp-signature, 728 B)
-----BEGIN PGP SIGNATURE-----
Comment: Charset: ISO-8859-1

iQHPBAABCgA5FiEE2oNkebTd5YKFiBG5fue2cNoeGfgFAmnT7iMbFIAAAAAABAAO
bWFudTIsMi41KzEuMTIsMiwyAAoJEH7ntnDaHhn4cPEL/Ram3qxN18F9XnnCr5nX
5oDKpSs5OpL1shRiFlk2hD8XNR88mkn/JxLx1KY+5XIvMEEI6MAGIBK5ttbMmls8
XNrp3ZsjOMiFpirb/LNTKO3LrggYBgl+NHWfN8yU1v3BoSidw/XZqKntLLHdZweC
KCWZg67rbRtgfrI5Z1hcSP6cJWxaPyY6CvdsBfc+O6DCRyQXs0LWuQUwczY/oivD
OATkdJMFKyAKtWHW36jleW4BHgCLgEj/cf/+3PCeFY2Ic1QnxG7YobG8fkvLryae
xq0UjmE4WE4/t4DdVyXFd9tGDugH2QJwlzLWPKfbBrKgUGmvzLbWWtgErL8oVt7b
9NH4Ri8bAlRK0wQisVhEUbROxhTZvr4npkskkR/2sJovo3llI6cWKvyOJjsRf3ST
L4apSz6rixp+x+8E7VHrZg09K8LVuVGB07Dfu13/cx3zLRVdbAqjgbFIE74UAqvL
89tJnusLg+IaaqDSD/qdW6kPt1W01615X/O9eyQ/15bocQ==
=OY82
-----END PGP SIGNATURE-----