You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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.)
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 do you think about replacing the ComboBox with a Button and Flyout like we do for git branches? Please let me know if you want me to push a commit.
What do you think about replacing the ComboBox with a Button and Flyout like we do for git branches? Please let me know if you want me to push a commit.
src/Files.App/Data/Items/EncodingItem.cs — Changed the built-in Chinese encoding from gb2312 to gb18030, which is a strict superset and matches the encoding name returned by DetectEncodingAsync.
src/Files.App/Services/Storage/StorageArchiveService.cs — In IsEncodingUndeterminedAsync, entries whose names consist entirely of ASCII characters are now considered determined (not undetermined), even if they don't declare Unicode. This avoids showing the encoding picker when the zip content is pure ASCII and doesn't need a specific non-UTF-8 encoding.
src/Files.App/Data/Models/DirectoryPropertiesViewModel.cs (the StatusBarViewModel) — When auto-detect finds an encoding not present in the built-in list, it dynamically creates an EncodingItem for it and appends it to the options, ensuring the detected encoding always appears in the dropdown.
I've fixed all the problems you listed here. I think we can continue now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
