From 6e8a7a87e00844b0efb449516ddf3aaa0b8dc750 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 27 Nov 2017 14:48:15 +0100 Subject: doc: Add a comment to the Windows registry functions. -- --- src/w32-reg.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/w32-reg.c b/src/w32-reg.c index 8aefa52..8b1bf8a 100644 --- a/src/w32-reg.c +++ b/src/w32-reg.c @@ -39,7 +39,9 @@ /* Return a string from the W32 Registry or NULL in case of error. * Caller must release the return value. A NULL for root is an alias - * for HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE in turn. */ + * for HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE in turn. The returned + * string is UTF-8 encoded; ROOT, DIR, and NAME must be plain + * ASCII. */ char * _gpgrt_w32_reg_query_string (const char *root, const char *dir, const char *name) @@ -74,6 +76,8 @@ _gpgrt_w32_reg_query_string (const char *root, const char *dir, return NULL; /* still no need for a RegClose, so return direct */ } + + /* FIXME: Use wide functions and convert to utf-8. */ nbytes = 1; if (RegQueryValueExA (key_handle, name, 0, NULL, NULL, &nbytes)) { -- cgit v1.2.3