Page MenuHome GnuPG

gpgme: Error::asString can return wrongly encoded result on Windows
Testing, NormalPublic

Description

On Windows, gpgme calls gettext_use_utf8(1) to enable UTF-8 encoded error descriptions in gpgrt, but this only affects the main thread (see T7185).

If Error::asString is first called from a secondary thread, then subsequent calls of Error::asString from the main thread return the error description in native encoding. This is caused by caching (which was introduced to control the lifetime of the char pointer returned by Error::asString) together with the current behavior that UTF-8 encoding is only used for the main thread.

Event Timeline

ikloecker created this task.
ikloecker moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.
ikloecker changed the task status from Open to Testing.Jul 5 2024, 10:35 AM

This should be tested as part of testing T5960 by checking that the German error description "Falscher Rückstellcode" is shown after entering a wrong reset code (PUK) for an OpenPGP smart card (https://dev.gnupg.org/T5960#188013).

ebo moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.Sep 26 2024, 4:38 PM
ebo added a subscriber: ebo.

with gpg4win-Beta-50: "Rückstellcode" is shown correctly with an ü