How to create an archive using the zip command, if the file names contain unicode characters?


I created an empty file with the name of one character ★ (U + 2605), trying to archive it:

zip archive ★ -UN=UTF8 

I get the error:

 zip error: Internal logic error (empty name without -j or -r) 

    1 answer 1

    Most likely the zip version is used with the natspec patch .

    It provides for the inclusion of the default DOS-compatibility flag and the -K switch to disable it. But, unfortunately, in the patch, apparently, the bug: the file names are encoded into a dos-encoding, regardless of the flag.

    Solutions / further actions:

    • Build a zip without this patch.
    • Fix patch and rebuild the zip yourself.
    • Contact the author of the patch.
    • Contact the bugzilla of your distribution (better after one of the two previous points).
    • And (on the occasion of the imminent 29th anniversary of zip and 27th unicode), do not create zip archives with filenames in an encoding that is younger than the format itself.