Feature: Add ZIP encoding selection support for browsing archives with non-UTF-8 filenames#18529
Feature: Add ZIP encoding selection support for browsing archives with non-UTF-8 filenames#18529oxygen-dioxide wants to merge 11 commits into
Conversation
|
Problem: users still can't double-click a file in the archive to open it because process.Start() doesn't support custom zip encoding. (However, this bug also occurs for 7z files, so I may create another PR to fix it.) |
c9d280e to
722fb3c
Compare
|
Thanks! I'd like to take a closer look and get some feedback from @mdtauk but I can already tell that the overall location looks a lot better in that screenshot. |
|
What's the expected behavior when opening a regular zip file? |
|
For ascii or utf-8 zip file, the encoding selector shouldn't show up. I've fixed my code. |
There was a problem hiding this comment.
Do these newly added methods support password requesting? Apparently, it silently fails?
| var itemPath = System.IO.Path.Combine(Path, split[0]); | ||
| if (!items.Any(x => x.Path == itemPath)) | ||
| { | ||
| var folder = new ZipStorageFolder(itemPath, containerPath, backingFile); |
There was a problem hiding this comment.
Is GetBasicProperties encoding aware as well? If not, it may show incorrect date/size info.
| } | ||
| else | ||
| { | ||
| var file = new ZipStorageFile(winPath, containerPath, backingFile); |
|
CI is now failing and most of my reviews are still present. |



Problem
When opening a ZIP archive whose filenames use an encoding other than the user's OS encoding, the filenames appear garbled
Solution
Added a ComboBox in the navigation toolbar that appears when browsing a ZIP archive with undetermined encoding, allowing the user to select the appropriate character encoding. When a custom encoding is selected, the app switches from SevenZipSharp to SharpZipLib to read filenames and file contents.
Resolved / Related Issues
To prevent extra work, all changes to the Files codebase must link to an approved issue marked as
Ready to build. Please insert the issue number following the hashtag with the issue number that this Pull Request resolves.Steps used to test these changes
Stability is a top priority for Files and all changes are required to go through testing before being merged into the repo. Please include a list of steps that you used to test this PR.
previous behaviour:

current behaviour:
