From a0a4cd411c6d891e9ca784fd12b76410b0bb4673 Mon Sep 17 00:00:00 2001 From: Andre Heinecke Date: Wed, 25 Oct 2023 17:20:56 +0200 Subject: 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. GnuPG-Bug-Id: T6728 --- src/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Makefile.am') diff --git a/src/Makefile.am b/src/Makefile.am index 67805a89..ca709509 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -120,6 +120,8 @@ if HAVE_W32_SYSTEM # wrapper process. libexec_PROGRAMS = gpgme-w32spawn +gpgme_w32spawn_CFLAGS = -municode + RCCOMPILE = $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) LTRCCOMPILE = $(LIBTOOL) --mode=compile --tag=RC $(RCCOMPILE) -- cgit v1.2.3