-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Feature: Added support for changing encoding when extracting ZIP files #17022
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
Merged
Merged
Changes from 11 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
3504328
support extracting zip file with certain encoding
oxygen-dioxide 06094d2
prepare for sync from latest
oxygen-dioxide ac78cc7
Merge pull request #2 from oxygen-dioxide/latest
oxygen-dioxide 5d9c4ba
add back sharpziplib
oxygen-dioxide 86d1b34
Update src/Files.App/Dialogs/DecompressArchiveDialog.xaml
oxygen-dioxide 5b3d0f0
Update src/Files.App/Dialogs/DecompressArchiveDialog.xaml
oxygen-dioxide f1c956e
Update src/Files.App/Dialogs/DecompressArchiveDialog.xaml
oxygen-dioxide 42e6346
Update src/Files.App/Strings/en-US/Resources.resw
oxygen-dioxide 0c3ed1f
Update src/Files.App/Data/Items/EncodingItem.cs
oxygen-dioxide 3a699fb
Update src/Files.App/Strings/en-US/Resources.resw
oxygen-dioxide 00aeac8
Update src/Files.App/Dialogs/DecompressArchiveDialog.xaml
oxygen-dioxide e6bb8e4
combobox
oxygen-dioxide ef6a270
string key was changed from 'ArchiveEncoding' to 'Encoding'
oxygen-dioxide File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Copyright (c) 2024 Files Community | ||
// Licensed under the MIT License. See the LICENSE. | ||
|
||
using System.Text; | ||
|
||
namespace Files.App.Data.Items | ||
{ | ||
/// <summary> | ||
/// Represents a text encoding in the application. | ||
/// </summary> | ||
public sealed class EncodingItem | ||
{ | ||
|
||
public Encoding? Encoding { get; set; } | ||
|
||
/// <summary> | ||
/// Gets the encoding name. e.g. English (United States) | ||
/// </summary> | ||
public string Name { get; set; } | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="EncodingItem"/> class. | ||
/// </summary> | ||
/// <param name="code">The code of the language.</param> | ||
public EncodingItem(string code) | ||
{ | ||
if (string.IsNullOrEmpty(code)) | ||
{ | ||
Encoding = null; | ||
Name = Strings.Default.GetLocalizedResource(); | ||
} | ||
else | ||
{ | ||
Encoding = Encoding.GetEncoding(code); | ||
Name = Encoding.EncodingName; | ||
} | ||
} | ||
|
||
public override string ToString() => Name; | ||
} | ||
} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
using Microsoft.UI.Xaml; | ||
using Microsoft.Windows.AppLifecycle; | ||
using System.IO; | ||
using System.Text; | ||
using Windows.ApplicationModel.Activation; | ||
using Windows.Storage; | ||
using static Files.App.Helpers.Win32PInvoke; | ||
|
@@ -55,6 +56,7 @@ static Program() | |
[STAThread] | ||
private static void Main() | ||
{ | ||
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @oxygen-dioxide apologies only mentioning this now, but this should really go under AppLifecycleHelper. |
||
WinRT.ComWrappersSupport.InitializeComWrappers(); | ||
|
||
// We are about to do the first WinRT server call, in case the WinRT server is hanging | ||
|
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.