Home GnuPG
Diffusion GPGME a0a4cd411c6d

Change gpgme-w32-spawn to unicode

Description

Change gpgme-w32-spawn to unicode

* src/Makefile.am (gpgme_w32spawn_CFLAGS): Add -municode.
* src/gpgme-w32-spawn.c (build_commandline, my_spawn)
(translate_handles): Convert to wchar_t API.
(main): Use wmain instead.

Some time ago we introduced an inconsistency that w32-util called
gpgme-w32-spawn through CreateProcessW but since gpgme-w32-spawn
internally worked with 8 bit the chars were mangled and the
arguments not passed correctly through the CreateProcessA of the
child process. Since the GnuPG processes use GetCommandLineW
this is the proper way to pass on Unicode command line arguments.

Please note that we did not pass UTF-8 before this patch but
rather some broken native encoding where Windows replaces
unicode characters with question marks etc.

Details

Provenance
aheineckeAuthored on Oct 25 2023, 5:20 PM
Parents
rM8faaf7b72bfd: Post release updates
Branches
Unknown
Tags
Unknown
Tasks
T6728: Kleopatra: encryption via "Encrypt folder" has unicode issue