Hi, first of all: thank you for great work!
But, I have a problem with zip32.dll:
Packing works fine, but Filenames inside the archive not
e.g. Prüfungsergebnis.hmtl gets Pr³fungsergebnis.html
als long as I use youre unzipping dlls, the files get back the proper names in the unzipping process, but not with other tools, like the build in zip function of windows itself.
Is there a way to influence the character encoding?
Thanks a lot
I use zip32.dll Version 2.32, Date 1. July 2006, on Windows 7 64bit, German Region Settings
I know very little about Windows, the Zip DLL, or exotic character
encodings, but...
I would start by looking at Zip version 3.0 (July 5th 2008). There
are also public beta versions up to Zip version 3.1d-BETA (November 15th
2015). (And if 3.1d isn't good enough, then the Zip maintainer might be
willing to provide an early (pre-beta) 3.1e kit.)
Zip 3.1d claims to offer Unicode support, which might be helpful with
your umlauts. I believe that there have been some changes to the DLL
interface since 2.32, so some work may be needed in the application to
use the newer Zip DLL versions. (And more changes are still possible
for 3.1e and later.)
I don't see the Zip 3.1d kit in the "Home / unreleased Betas / Zip
betas" folder here, but all the beta kits should be available on the
Info-ZIP server: ftp://ftp.info-zip.org/pub/infozip/beta/
Zip 2.32 and earlier 2.3x depended on character set encodings for special characters. UnZip 5.x was designed to work with those encodings. However UnZip 5.x performed something called OEM conversions on the characters, basically converting between the DOS/Windows internal representation and the original equipment manufacturer character set. Because UnZip did this conversion (which actually was the right way to do it), Zip had to encode paths that way to be compatible. I did go back and forth with the UnZip Maintainer at the time, but to no avail. There's a lot of code in Zip to support OEM conversions.
However, other zips and unzips, at the time and still today, just store the internal character set and don't do the OEM conversion. That results in small differences,which I think is what you're noticing. There was some effort between zip/unzip developers to resolve this, but they really didn't go anywhere. We were kind of stuck with it and others didn't want to start doing it.
The final "fix" ended up to be everyone in the zip community settling on Unicode encoding of everything, which bypasses this OEM conversion. Specifically UTF-8 encoding. We actually were the first to push that with our extra fields, but PKWARE later defined the UTF-8 bit and that allowed direct storage of UTF-8. The above is not an issue with UTF-8 paths. Zip 3.0 was the first Zip to use UTF-8.
All that aside, if you can compile your own code, you might try turning off WIN_OEM on Zip and the equivalent on UnZip. That may make the DLLs more compatible with others, but not with others using the out of the box Info-ZIP DLLs.
If you decide to try a Zip 3.1x DLL, be aware that things have slightly changed from beta to beta. The output remains zip standard compatible, but the code interface has evolved, and so the code needed to use the DLL. We're currently finalizing the Zip 3.1e DLL and that likely will be the version that goes out with Zip 3.1.
Thank you so much for your replies
Zip 3.1d (Unicode):
I was able to get, build and test this version, there is progress:
“Prüfung.html” in Zip archive:
7 Zip: displays correct “Prüfung.html”
Build in Windows: displays and extracts as “Pr++fung.html “
Unzip 3.1d: honestly not tested, but I have full trust in you
Zip 2.32, turning off WIN_OEM
I took the zip32.dll from zip232dn.zip, but I don’t find the source code there, so I could not make a mod of this zip32.dll.
My Situation is this:
We are planning a feature to backup and zip all of the files (which are various office documents and databases) and of course to restore them if needed.
The Priority is that the own application can restore the files and names, compatibility with other programs would be nice.
On actual work on this feature has been done yet, I’m currently testing the basics.