Changing the default ANSI to UTF-8 in Notepad
I got an e-book reader a few months ago, and I finally figured out why it doesn't display .txt files correctly. It doesn't like ANSI. It has no problem with the other 3 types of coding notepad provides.
For a reason I chose UTF-8 and decoded all the .txt files I have on it (we are talking thousands of small but important documents). They work correctly and now I pay attention to save in UTF-8, but I know myself, I know that at some point I will forget it, and save in the default ANSI.
So the question after the small novel: Is there any way to change the default coding when saving a newly opened notepad? (Win 7)
I know about the way to change the default when opening a previously created .txt file but it's a pain to always create the new document first.
Solution 1:
Trying to offer a clear on-site answer:
- Right click on Desktop, then choose New > Text Document
- A text file
New Text Document.txt
is created. Don't type anything and open it. - Go to File > Save As... and choose UTF-8 under
Encoding:
, pressSave
and overwrite the existing file. Close the file. - Rename
New Text Document.txt
toTXTUTF-8.txt
- Copy
"TXTUTF-8.txt"
toC:\WINDOWS\SHELLNEW
- Go to
Start > Run...
and typeregedit
and press ok - Navigate to
HKEY_CLASSES_ROOT\.txt\ShellNew
- Right click in the right window > New >
String Value
and rename it toFileName
- Double click on
FileName
and putTXTUTF-8.txt
intoValue data:
field and press ok
The flaw of this solution is that whenever you want to open a blank utf-8 txt document you will have to right click > New > Text Document and work from there.
Remember: Modifying the registry is dangerous! Use at your own risk.
Source
Solution 2:
This here is a pretty good explanation for how to change your default encoding to UTF-8. You will need to touch the registry files though.
Personally I wouldn't bother with it. Just download Notepad++. It's free, awesome and defaults to UTF-8.