Include default system code page in default encodings #11486
Merged
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.
Proposed changes
Include default system code page in default encodings list.
Before
On Windows 10 PL, the default encoding set in GitExtensions contain the following: UTF-8, US-ASCII, Unicode, Central European (DOS).
"Central European DOS", cp852, is the one returned by GetEncoding(CultureInfo.CurrentCulture.TextInfo.OEMCodePage).
Under Windows however, the default 8-bit encoding of files in PL locale is "Central European (Windows)" (ansi / windows-1250). This encoding is returned by GetEncoding(0). So, in order to use it (in diff viewer, for example), one must find and change the git encoding setting.
After
Result of GetEncoding(0) is also added to populate the default encoding list.
Test methodology
Test environment(s)
Merge strategy
I agree that the maintainer squash merge this PR (if the commit message is clear).
✒️ I contribute this code under The Developer Certificate of Origin.