1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

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 <wk@gnupg.org>
This commit is contained in:
Andre Heinecke 2016-01-26 09:53:42 +01:00 committed by Werner Koch
parent b8bb16c6c0
commit 3e50236d4e
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
3 changed files with 62 additions and 15 deletions

View file

@ -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*/