When writing file names in Cyrillic, the file is not written
Hello! I trying to write file to zip with cyrillic symbols
zip_entry_open(zip, "тест.txt");
zip_entry_write(zip, content, size);
zip_entry_close(zip);
Archive is empty..
We've already discussed utf-8 topic in many threads. Please take a look: https://github.com/kuba--/zip/search?q=utf-8&type=issues
This library is based on https://github.com/richgel999/miniz and we want to keep it compatible is much as possible.
UTF-8 for entry names (and comments) is supported by ZIP spec. if 11 BIT is set in general purpose bit flag. (https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT)
Unfortunately miniz checks only encryption bits for general purpose bit flag.
So, first we need to add support to miniz. After that, update dependency for this library.
We support this issue with 40tb archive of Open Source Buddhism Library. Most part of our archive materials is on asian languages and humanly no possible rename all this materials.
Please accept heart gratitude from all our library team for your and Miniz team generous contribution to open source community for benefit of all mankind.
Open Source Buddhism Library Alexander Stroganov
Guys @HellsCoder, @RimeOCRLIB - I've sent a PR (https://github.com/kuba--/zip/pull/323) with migration to miniz v.3.0.2. So on the branch https://github.com/kuba--/zip/tree/miniz-3.0.2 you can find a new code with upgraded miniz lib. With that said, you can try to use UTF-8 like in the test which I've recently added: https://github.com/kuba--/zip/blob/miniz-3.0.2/test/test_write.c#L44
If you use this library to compress/decompress or tools like macos finder, etc. it should work fine. But keep in mind it's just a proposal, so some tools may not work.
This library is based on https://github.com/richgel999/miniz and we want to keep it compatible is much as possible. UTF-8 for entry names (and comments) is supported by ZIP spec. if
11 BITis set in general purpose bit flag. (https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT) Unfortunatelyminizchecks only encryption bits for general purpose bit flag.So, first we need to add support to miniz. After that, update dependency for this library.
With new miniz (v3.0.2) it should be fixed, because an extra bit flag (MZ_ZIP_GENERAL_PURPOSE_BIT_FLAG_UTF8) was added.
I'm closing the issue, because after merge miniz-3.0.2 it should be fixed. Otherwise, do not hesitate to reopen it.