Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Legacy encoded zip archives won't unzip on Linux. #341

Open
microtherion opened this issue Nov 1, 2024 · 0 comments
Open

Legacy encoded zip archives won't unzip on Linux. #341

microtherion opened this issue Nov 1, 2024 · 0 comments

Comments

@microtherion
Copy link
Contributor

Summary

When the UTF-8 flag in a zip archive is omitted, ZIPFoundation is trying to use CP437. This works on Apple platforms, but is not supported on Linux. As a result, all filenames default to "", and unzipping fails.

If Wikipedia is to be believed, CP437 in the spec is more theoretical, and in practice, legacy archives used whatever code page was set on the system. So maybe the easiest solution might be to pick an arbitrary 8-bit ASCII extension that is supported on Linux (e.g. I used .latin1 successfully for my purposes).

Related Link

Reported the problem on the Swift side: swiftlang/swift-foundation#1029. Maybe they'll get around to fixing this (they seemed interested when I mentioned that in principle, CP437 is mandated by the ZIP spec):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant