How can you read a file from a zip by opening the zip with a wide string file path? I only saw libraries and code examples with std::string
or const char *
file paths but I suppose they may fail on Windows with non-ASCII characters. I found this but I'm not using gzip
.
Attempts
const auto zip_file = unzOpen(jar_file_path.string().c_str()); // No wide string support
if (zip_file == nullptr)
{
throw std::runtime_error("unzOpen() failed");
}
libzippp::ZipArchive zip_archive(jar_file_path.string()); // No wide string support
const auto file_opened_successfully = zip_archive.open(libzippp::ZipArchive::ReadOnly);
if (!file_opened_successfully)
{
throw std::runtime_error("Failed to open the archive file");
}
Zipper
does not seem to support wide strings either. Is there any way it can currently be done?