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/protos.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/protos.h') diff --git a/src/protos.h b/src/protos.h index 9a8d57a..7cc3489 100644 --- a/src/protos.h +++ b/src/protos.h @@ -24,6 +24,7 @@ /*-- w32-gettext.c --*/ wchar_t *_gpgrt_utf8_to_wchar (const char *string); void _gpgrt_free_wchar (wchar_t *wstring); +char *_gpgrt_wchar_to_utf8 (const wchar_t *string, size_t length); void _gpgrt_w32_set_errno (int ec); -- cgit v1.2.3