We need to check how good is the support for non-unicode characters in filenames.
Test application
This will list a zip archive using libzip:
// test.cpp #include <iostream> #include "zip.hpp" int main(int argc, char *argv[]) { try { libzip::Archive archive(argv[1]); for (auto file : archive) { std::cout << file.name << std::endl; } } catch (const std::exception &ex) { std::cerr << ex.what() << std::endl; } return 0; }
Requirements
- libzip installed
- zip.hpp file from https://bitbucket.org/markand/libzip/src
Compile
$ g++ test.cpp -I/usr/lib/libzip/include -lzip -o test
Usage
$ ./test foo.zip