From dbedf190969de1a796560cfa15fb4ea986bc79dc Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Fri, 9 Oct 2020 15:36:51 +0200 Subject: w32: Support utf8 also for getcwd. * src/sysutils.c (_gpgrt_getcwd) [W32]: Implement utf-8 support. * src/w32-gettext.c (wchar_to_native): Factor some code out to .. (wchar_to_cp): new. (_gpgrt_wchar_to_utf8): New. * tests/t-stringutils.c: Include windows.h. (utf8_to_wchar): New. (wchar_to_utf8): New. (mygetcwd): Use wchar version for Windows. (main): New option --pwd. --- src/stringutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/stringutils.c') diff --git a/src/stringutils.c b/src/stringutils.c index d92398d..0be8769 100644 --- a/src/stringutils.c +++ b/src/stringutils.c @@ -48,7 +48,7 @@ _gpgrt_vfnameconcat (int want_abs, const char *first_part, va_list arg_ptr) char *home_buffer = NULL; char *name, *home, *p; - /* Put all args into an array becuase we need to scan them twice. */ + /* Put all args into an array because we need to scan them twice. */ n = strlen (first_part) + 1; argc = 0; while ((argv[argc] = va_arg (arg_ptr, const char *))) -- cgit v1.2.3