From 0f7b327ccf6d2018b193d5598c4a8a338f874a59 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Fri, 6 Sep 2024 10:39:25 +0900 Subject: w32: Clarify the environment block encoding. * src/spawn-w32.c (_gpgrt_spawn_actions_set_envvars): It's an ASCII string. -- In future, we can extend it as UTF-8 string. When doing so, we will detect ASCII or utf-8, and if needed, convert it to Unicode wchar string with four-byte-zero terminated, and let the flag have CREATE_UNICODE_ENVIRONMENT. Signed-off-by: NIIBE Yutaka --- src/spawn-w32.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/spawn-w32.c b/src/spawn-w32.c index e7be33c..ccd1733 100644 --- a/src/spawn-w32.c +++ b/src/spawn-w32.c @@ -526,6 +526,9 @@ _gpgrt_spawn_actions_release (gpgrt_spawn_actions_t act) xfree (act); } +/* Set the environment block for child process. + * ENV is an ASCII encoded string, terminated by two zero bytes. + */ void _gpgrt_spawn_actions_set_envvars (gpgrt_spawn_actions_t act, char *env) { -- cgit v1.2.3