3

The PKZipC documentation mentions the -utf8 option to store non-ASCII filenames as UTF-8 inside a ZIP, but doesn't say how to add such files using an @list argument to pkzipc -add.

I tried several combinations of running with/without the -utf8 switch, and using @list files saved in UTF-8 or UTF-16 encodings with/without BOMs, but they all failed.

I am wondering if anyone had better luck in getting this to work.

dxiv
  • 2,073

2 Answers2

2

As you have tried all the possible combinations of the -utf8 switch and @list with UTF-8 or UTF-16 encoding and even with/without BOMs, I don't see what else you can do using PKZipC for Windows and its parameters.

I would advise to get in touch with PKWARE Support and complain, although this may not immediately bring a solution.

In the meantime, you will need to transform file-names containing non-ASCII characters into names without such characters. This format is called the short form of the file-name, which is basically the old DOS format of the 8.3 file-name. The dir /x command will display these names.

For getting the short names for a bunch of files, see the post How can I find the short path of a Windows directory/file? where various solutions are listed. I especially liked this answer that proposed the following one-liner:

cmd /c for %A in ("C:\Program Files") do @echo %~sA

Here is an example on how you may use it:

enter image description here


As you say that your IT has decided to disable NTFS 8.3 short names on your network shares, I would suggest looking for an alternative. Some I would suggest testing are:

harrymc
  • 498,455
1

Using command prompt, try this:

  • execute command chcp 65001 to change cmd's code page to utf8

  • Then execute your pkzipc command with -utf8

Hope it helps you.

Tom Kim
  • 111