microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
111.1k stars 6.54k forks source link

Preview of All Unregistered Files as Text or possibly Hex Dump #18181

Open PeterHouseJr opened 2 years ago

PeterHouseJr commented 2 years ago

Description of the new feature / enhancement

There are a lot of file extensions which are not registered and do not show on preview. I would suggest an option to view these as text by default. Maybe an additional option would be to detect files with non-ASCII content and preview them as a hex dump instead of text.

Scenario when this would be used?

As a developer, I have a .reg file for adding "PerceivedType"="Text" to about 50 different file types and am constantly having to add more to this .reg key file and then run it to update the registry.

Supporting information

Possible Hex Dump Format: AAAAAAAA HH HH HH HH HH HH HH HH - HH HH HH HH HH HH HH HH %%%%%%%% - %%%%%%%% A is the address in the file beginning with 00000000 HH is the Hex Code for the byte value % is the ASCII character for the corresponding Byte. "." for non printable ASCII character.

I know this does not take into consideration unicode.

Aaron-Junker commented 2 years ago

@niels9001 Would you have interest and time to create a simple UI where people could type in extensions and then select if this externsion is a hex or a text extension?

niels9001 commented 2 years ago

@niels9001 Would you have interest and time to create a simple UI where people could type in extensions and then select if this externsion is a hex or a text extension?

Sure, if you can have a super basic spec I can do the XAML!

Aaron-Junker commented 2 years ago

@niels9001 Would you have interest and time to create a simple UI where people could type in extensions and then select if this externsion is a hex or a text extension?

Sure, if you can have a super basic spec I can do the XAML!

Great!

Aaron-Junker commented 2 years ago

@crutkas I would love to use a javascript library called hexy to display hex files. It has a MIT license, so technically we could use it. Should I still ask for permission?