Re: Different locale for pinentry

Werner Koch via Gnupg-users <[email protected]> Mon, 06 Apr 2026 17:42:22 +0200
Newsgroups gmane.comp.encryption.gpg.user
Message-ID <[email protected]>
Hi!

On Mon,  6 Apr 2026 00:35, Klaus Ethgen said:

> Is there any way to start GUI stuff with UTF-8-locale instead of
> something else? Alternatively, the whole gpg-agent or any pinentry could
> be made started with UTF-8.

The static strings presented by Pinentry (like Counter:/Zähler:) are
provided by gpg-agent.  Thus the gettext used by gpg-agent is
responsible for this.  gpg-agent however switches gettext quite early to
utf-8:

  /* gpg-agent usually does not output any messages because it runs in
     the background.  For log files it is acceptable to have messages
     always encoded in utf-8.  We switch here to utf-8, so that
     commands like --help still give native messages.  It is far
     easier to switch only once instead of for every message and it
     actually helps when more then one thread is active (avoids an
     extra copy step). */
    bind_textdomain_codeset (PACKAGE_GT, "UTF-8");

Thus pinentry sees UTF-8 and depending on the type of pinentry this
should work.  It might be that sme pinentries switch to some native
encoding depending on $TERM.

  gpg-connect-agent 'getinfo std_env_names' /bye

gives a list of envvars passed on to Pinentry and are initially set by
gpg, gpgsm etc.



Shalom-Salam,

   Werner


-- 
The pioneers of a warless world are the youth that
refuse military service.             - A. Einstein

_______________________________________________
Gnupg-users mailing list
[email protected]
https://lists.gnupg.org/mailman/listinfo/gnupg-users
openpgp-digital-signature.asc (application/pgp-signature, 284 B)
-----BEGIN PGP SIGNATURE-----

iJ8EARYKAEcWIQSHd0YfKgdOvEgNNZQZzByeCFsQegUCadPUXhsUgAAAAAAEAA5t
YW51MiwyLjUrMS4xMSwyLDINHHdrQGdudXBnLm9yZwAKCRAZzByeCFsQevrAAP0e
5jhx815m+LtlSjFqIeykJ+Kw9JzjFUcda0Anar/hRwD+NA8Wodo2cxkYW95CMeTc
xIrc6sqcJDpKwpuetf347AM=
=ni5V
-----END PGP SIGNATURE-----