{"action":"created","issue":{"url":"https://api.github.com/repos/ZipArchive/ZipArchive/issues/240","repository_url":"https://api.github.com/repos/ZipArchive/ZipArchive","labels_url":"https://api.github.com/repos/ZipArchive/ZipArchive/issues/240/labels{/name}","comments_url":"https://api.github.com/repos/ZipArchive/ZipArchive/issues/240/comments","events_url":"https://api.github.com/repos/ZipArchive/ZipArchive/issues/240/events","html_url":"https://github.com/ZipArchive/ZipArchive/issues/240","id":141560700,"number":240,"title":"Unzip with password doesn't work with libstdc++","user":{"login":"erwinl","id":330469,"avatar_url":"https://avatars.githubusercontent.com/u/330469?v=3","gravatar_id":"","url":"https://api.github.com/users/erwinl","html_url":"https://github.com/erwinl","followers_url":"https://api.github.com/users/erwinl/followers","following_url":"https://api.github.com/users/erwinl/following{/other_user}","gists_url":"https://api.github.com/users/erwinl/gists{/gist_id}","starred_url":"https://api.github.com/users/erwinl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erwinl/subscriptions","organizations_url":"https://api.github.com/users/erwinl/orgs","repos_url":"https://api.github.com/users/erwinl/repos","events_url":"https://api.github.com/users/erwinl/events{/privacy}","received_events_url":"https://api.github.com/users/erwinl/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-03-17T11:51:09Z","updated_at":"2016-08-26T02:53:44Z","closed_at":null,"body":">Note: \r\n>This case is only for unzipping encrypted (password protected) zip file. Normal zip file works fine.\r\n\r\nI'm using SSZipArchive to unzip encrypted zip file and it works fine if I use `libc++ (LLVM C++ standard library with C++11 support)` as the `C++ Standard Library`.\r\n\r\nHowever one of the framework I have to use in my project requires `libstdc++ (GNU C++ standard library)`, otherwise it won't compile because of missing symbols.\r\n\r\nI tried these two routes:\r\n\r\n- Setting `C++ Standard Library` to `libstdc++ (GNU C++ standard library)`.\r\n\r\n- Keep `C++ Standard Library` to `libc++ (LLVM C++ standard library with C++11 support)` and link against `libstdc++.6.0.9.tbd`.\r\n\r\nUnfortunately unzip with password fails in both cases. It fails [here](https://github.com/ZipArchive/ZipArchive/blob/master/SSZipArchive/SSZipArchive.m#L140):\r\n```objc\r\n// SSZipArchive.m line 140\r\n// ret is always != UNZ_OK when libstdc++ involved\r\nret = unzOpenCurrentFilePassword(zip, [password cStringUsingEncoding:NSASCIIStringEncoding]);\r\n```\r\n\r\nAny idea why is this happening? and the possible fix ?\r\n\r\nThanks in advance."},"comment":{"url":"https://api.github.com/repos/ZipArchive/ZipArchive/issues/comments/242613409","html_url":"https://github.com/ZipArchive/ZipArchive/issues/240#issuecomment-242613409","issue_url":"https://api.github.com/repos/ZipArchive/ZipArchive/issues/240","id":242613409,"user":{"login":"erwinl","id":330469,"avatar_url":"https://avatars.githubusercontent.com/u/330469?v=3","gravatar_id":"","url":"https://api.github.com/users/erwinl","html_url":"https://github.com/erwinl","followers_url":"https://api.github.com/users/erwinl/followers","following_url":"https://api.github.com/users/erwinl/following{/other_user}","gists_url":"https://api.github.com/users/erwinl/gists{/gist_id}","starred_url":"https://api.github.com/users/erwinl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erwinl/subscriptions","organizations_url":"https://api.github.com/users/erwinl/orgs","repos_url":"https://api.github.com/users/erwinl/repos","events_url":"https://api.github.com/users/erwinl/events{/privacy}","received_events_url":"https://api.github.com/users/erwinl/received_events","type":"User","site_admin":false},"created_at":"2016-08-26T02:53:44Z","updated_at":"2016-08-26T02:53:44Z","body":"Hello @daniel-beard, I was using dummy passwords such as \"password\" or \"12345\".\r\n\r\nI can confirm that the unzipping with password works ok if I use `libc++ (LLVM C++ standard library with C++11 support)` only. However when I add `libstdc++`, the unzipping always fail."}}
{"actor":{"display_login":"erwinl"}}