Page MenuHome GnuPG

Duplicated output (repeated nearly once) of the GnuPG console-output to "stdout" on Windows-Console if "Legacy-Console" with any TrueType Fonts is activated under Windows
Open, NormalPublic

Description

When we call gpg.exe under German LANG/LOCALE with any option in a Windows 10 Console-Window, that runs as a so called "Legacy-Console" with selected "TrueType-Fonts", i'm experiencing a duplicated output of any message, that is expected at this moment.
Used translations:

C:\Program Files (x86)\GnuPG\share\locale\de\LC_MESSAGES\gnupg2.mo
C:\Program Files (x86)\GnuPG\share\locale\de\LC_MESSAGES\libgpg-error.mo

Codepage

(The Codepage 850 or 65001 (UTF-8) is not relevant here ...)

C:\Users\localuser\Desktop>chcp
Aktive Codepage: 850.
For example (Windows 10 commandline-window as Legacy-Console with "Lucida Console" as TTF-Font selected) german translation.

C:\Users\localuser\Desktop>gpg --version
gpg (GnuPG) 2.2.36
libgcrypt 1.8.9
Copyright (C) 2022 g10 Code GmbH
License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: C:/Users/localuser/AppData/Roaming/GnuPG
Unterstützte Verfahren:
Öff. Schlüssel: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Verschlü.: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
           CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Komprimierung: nicht komprimiert, ZIP, ZLIB, BZIP2
gpg (GnuPG) 2.2.36
libgcrypt 1.8.9
Copyright (C) 2022 g10 Code GmbH
License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: C:/Users/localuser/AppData/Roaming/GnuPG
Unterstützte Verfahren:
Öff. Schlüssel: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Verschlü.: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
           CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Komprimierung: nicht komprimiert, ZIP, ZLIB, BZIP2
The same request under english translation works !!
C:\Users\localuser\Desktop>set LANG=en
C:\Users\localuser\Desktop>gpg --version
gpg (GnuPG) 2.2.36
libgcrypt 1.8.9
Copyright (C) 2022 g10 Code GmbH
License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: C:/Users/localuser/AppData/Roaming/GnuPG
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
        CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
The same request under german translation with Raster-Font (no TrueType-Font) works also !!

Also a Standard-Windows 10 Console (no legacy), does not have this issue ...

You may also check this issue with other commandline-options like: "--help" or "--gen-key", etc. ...

I've tested that issue with GnuPG 2.2.28 - 2.2.36.

Maybe it could be an string-termination issue or an issue in the german translation-file (po/mo) with the Windows 10 Legacy-Console-API ...

Also Microsoft states that the "Legacy"-version has only rudimentary utf-8 support.

Best regards,
Veit

Details

Version
2.2.28 - 2.2.36

Event Timeline

gniibe added a subscriber: gniibe.

In gnupg/common/ttyio.c, the function w32_write_console does:

  • Call WriteConsoleW, and when it fails, it calls
  • WriteConsoleA

This may be related.

werner triaged this task as Normal priority.Jul 26 2022, 9:07 PM