Home GnuPG
Diffusion GPGME 16462c54b350

qt: Handle encoding for diagnostics

Description

qt: Handle encoding for diagnostics

* lang/qt/src/threadedjobmixin.cpp (fromEncoding)
(stringFromGpgOutput): New helpers.
(markupDiagnostics): Use it.

The Problem is that on my western windows system GnuPG
gets CP 437 as GetConsoleOutputCP and prints in that codepage.
In a W32 GUI Application we get 0 as GetConsoleOutputCP and 1252
with GetACP.

The only thing that seemed to somehow match was GetOEMCP but
that might just be luck and it might still be broken in
other windows languages.

This code is also used in Kleopatra so it might make sense
to make it public once it is demonstrated that it works on
most systems.

Details

Provenance
aheineckeAuthored on Jul 18 2018, 11:27 AM
Parents
rM1686e07e77a1: json: Fix crash on invalid json
Branches
Unknown
Tags
Unknown