microsoft / microsoft/PowerToys

Support for text encodings other than UTF-8 and ASCII in the text preview handler

Open
#49,922 0 comments 0 reactions 0 assignees View on GitHub
Needs-Triage
Dominant language
C
Stars
139k
Forks
8.6k
PR merge metrics
PR metrics pending

Description

### Description of the new feature / enhancement

Allow us to override the current text encoding with a simple dropdown control in the text preview pane context menu.

### Scenario when this would be used?

In every text preview where the handler visibly failed to recognize the text encoding (if does any recognition at all).

### Supporting information

UTF-16 LE/BE are not supported and likely others as well. UTF-16 LE text files are shown with a bunch of null chars in the preview pane, rendering them (almost) unreadable.

In VS Code:
Image
In Preview Pane:
Image

Contributor guide

Open the contributing guide

Research direction

Start at the text preview handler and its pane context menu, then inspect how UTF-8 and ASCII are currently decoded. Add a simple encoding override control, including UTF-16 LE/BE support, and verify that affected text previews render without null characters.

Written by the indexing model from the issue text.

Assessment

Domain
desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.