mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
gpgtar,w32: Handle Unicode file names.
* tools/gpgtar.c (oUtf8Strings): New. (opts): Add option --utf8-strings. (parse_arguments): Set option. * tools/gpgtar.h (opt): Add field utf8strings. * tools/gpgtar-create.c (name_to_utf8): New. (fillup_entry_w32): Use that. (scan_directory): Ditto. (scan_directory) [W32]: Convert file name to utf8. (gpgtar_create): Convert pattern. -- Note that this works only with file names read from a file or if the specified files on the command line are plain ascii. When recursing into a directory Unicode file names work again. This limitation is due to main(int, char**) which can't get the wchar version. We could fix that but is needs a bit more work in our init code. GnuPG-bug-id: 4083 Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
eec70e539e
commit
34e7703a96
4 changed files with 68 additions and 10 deletions
|
@ -32,6 +32,7 @@ struct
|
|||
unsigned int debug_level;
|
||||
int quiet;
|
||||
int dry_run;
|
||||
int utf8strings;
|
||||
const char *gpg_program;
|
||||
strlist_t gpg_arguments;
|
||||
const char *outfile;
|
||||
|
@ -121,7 +122,7 @@ struct tar_header_s
|
|||
|
||||
unsigned long long nrecords; /* Number of data records. */
|
||||
|
||||
char name[1]; /* Filename (dynamically extended). */
|
||||
char name[1]; /* Filename (UTF-8, dynamically extended). */
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue