4 ms·
Very tangential: I was zipping up an executable for a Windows-using friend just yesterday, and the exe had a non-ASCII filename. I first zipped it with macOS co
by oefrha 4y ago
Very tangential: I was zipping up an executable for a Windows-using friend just yesterday, and the exe had a non-ASCII filename. I first zipped it with macOS command line zip(1). Surprised to learn that it unzipped into a gibberish filename on Windows. I then tried to “Compress to ZIP file” from Windows 11 File Explorer, and it wouldn’t even let me do that: “… cannot be compressed because it includes characters that cannot be used in a compressed folder…” How the hell is that acceptable in 2022?
- baisq 4y agohttps://devblogs.microsoft.com/oldnewthing/20180515-00/?p=98755 https://devblogs.microsoft.com/oldnewthing/20180515-00/?p=98...
- porbelm 4y agoWindows is full of forbidden path characters, and it always will be until they abolish some forty years of backwards compatibility (the CON, allowed characters etc) and expose their quite modern file system for what it is, abolishing fucking drive letters once and for all.
- oefrha 4y agoIn this case these are not forbidden path characters, just non-Latin characters without any special meaning. At some point you should say "fuck Latin-1, this looks like Unicode so we're decoding as Unicode", not "don't use the Latin alphabet? You don't deserve to use a computer". Not being able to use perfectly normal strings like aux or nul as filenames is of course an entirely different category of madness.
- ok123456 4y agohttps://en.wikipedia.org/wiki/Bush_hid_the_facts https://en.wikipedia.org/wiki/Bush_hid_the_facts
- edflsafoiewq 4y agoThere is a bit in the ZIP that's supposed to tell you the path and comment are encoded in UTF8. It's bit 11 of the general purpose flag. Despite being there since 2006 it's poorly supported by Windows and Mac. I believe Mac writes the path in UTF8 but doesn't set the bit.
- netheril96 4y agoIt is not tangential at all. The main reason I use 7z over built-in zip is because the former handles Unicode properly instead of the compression ratio difference (which is minor in daily use cases). > How the hell is that acceptable in 2022? Because Microsoft is hell bent on backwards compatibility.
- GoblinSlayer 4y agoOriginally file names in zip were in code page 437. For backward compatibility utf8 can be used only if it's already native encoding.
- bumblebritches5 4y ago