gpgtar,w32: Fix gpgtar 8 bit encoding handling on W32
authorAndre Heinecke <aheinecke@intevation.de>
Tue, 26 Jan 2016 08:53:42 +0000 (09:53 +0100)
committerWerner Koch <wk@gnupg.org>
Tue, 26 Jan 2016 08:53:42 +0000 (09:53 +0100)
commit3e50236d4ecc3601b2641bf4273a0ff64bb5fdc4
tree6eb1cf224143969a5b60e622a0fd7e1479ee6b51
parentb8bb16c6c08d3c2947f1ff67419b36eb203c5c1a
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>
common/utf8conv.c
common/utf8conv.h
tools/gpgtar-create.c