Different locale for pinentry

Werner Koch wk at gnupg.org
Mon Apr 6 17:42:22 CEST 2026


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openpgp-digital-signature.asc
Type: application/pgp-signature
Size: 284 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gnupg-users/attachments/20260406/2ee72e51/attachment.sig>


More information about the Gnupg-users mailing list