From 3e50236d4ecc3601b2641bf4273a0ff64bb5fdc4 Mon Sep 17 00:00:00 2001 From: Andre Heinecke Date: Tue, 26 Jan 2016 09:53:42 +0100 Subject: gpgtar,w32: Fix gpgtar 8 bit encoding handling on W32 * common/utf8conv.c (wchar_to_utf8): Factor code out to ... (wchar_to_cp): new. (utf8_to_wchar): Factor code out to ... (cp_to_wchar): new. (wchar_to_native): New. (native_to_wchar): New. * tools/gpgtar-create.c (fillup_entry_w32): Use native_to_wchar. (scan_directory): Use wchar_to_native. -- Gpgtar needs to handle filenames in the local 8 bit encoding on Windows as it uses the 8 bit file io functions. GnuPG-bug-id: 1624, 1746 Patch from bug 1624 modified to fit into GnuPG 2.1 by wk. Signed-off-by: Werner Koch --- common/utf8conv.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'common/utf8conv.h') diff --git a/common/utf8conv.h b/common/utf8conv.h index ad7dbe977..def35def0 100644 --- a/common/utf8conv.h +++ b/common/utf8conv.h @@ -48,6 +48,8 @@ size_t jnlib_iconv (jnlib_iconv_t cd, const char **inbuf, size_t *inbytesleft, int jnlib_iconv_close (jnlib_iconv_t cd); #ifdef HAVE_W32_SYSTEM +char *wchar_to_native (const wchar_t *string); +wchar_t *native_to_wchar (const char *string); char *wchar_to_utf8 (const wchar_t *string); wchar_t *utf8_to_wchar (const char *string); #endif /*HAVE_W32_SYSTEM*/ -- cgit v1.2.3