You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@ghorwin, I've run into the same issue and the situation is that this library doesnt handle unicode at all on Windows. Windows APIs dont support UTF8.
All of the underlying Win32 calls are to the ____A variants of the system APIs (eg. CreateFileA) rather than the ____W variants. This means that you're passing utf8 encoded strings into APIs that are expecting ASCII.
As a work around, you can use the stream based APIs.
Something like:
std::wstring outfile = L"C:\\outdir-äöü.zip";
std::fstream outStream(outfile, std::ios_base::binary | std::ios_base::out);
ziplib::Zipper zipper(outStream);
std::wstring file = L"C:\\äöü.txt";
std::ifstream inStream(file, std::ios::binary);
zipper.add(inStream, "file.txt"); // You can convert the name to utf8 here
zipper.close();
outStream.close();
Hi,
I have a problem with zip files where filenames/folder names contain "umlaute" and the zip was created in Windows using local latin9 encoding.
When unzipping on Linux utf8 encoding is expected, causing mangled filenames.
How could zip-filename-encoding be supported best in zipper?
The text was updated successfully, but these errors were encountered: