Forum Discussion
1234598765
Aug 21, 2019Copper Contributor
Notepad Default encoding UTF8 Windows 10 Version 1903
Hello, does anyone know if you can re-enable ANSI encoding by registry in the notepad, instead of the default UTF8 encoding, which is given since Windows 10 version 1903.
MalTorte
Dec 03, 2019Copper Contributor
It's not quite so easy!
Many people use Notepad for a quick .cmd/.bat file. These will not run under the command interpreter if encoded as UTF-8. The command interpreter simply gives a non-printable character plus the first character of the .cmd/.bat file and "is not recognized as a command" error if run from command prompt. If run as standalone, the window simply blinks open and closes immediately and does not execute the desired commands.
Anyone wanting to write a .cmd or .bat now needs to remember to save as ANSI - very inconvenient!
It would be very nice to have access to a key (maybe under HKCU\Software\Microsoft\Notepad) that respected the user's wishes for default coding. Or maybe Notepad could offer to set the coding as default?
abbodi1406
Dec 04, 2019Iron Contributor
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Notepad]
"iDefaultEncoding"=dword:00000001
; 1 = ANSI
; 2 = UTF-16 LE
; 3 = UTF-16 BE
; 4 = UTF-8 BOM
; 5 = UTF-8- Serge_FraguasNov 28, 2023Copper ContributorUnderrated answer. Works like a charm! Thanks!
- ArmstchiDec 08, 2020Copper Contributoroh god. This works. It saved me. Thanks you.