Summary:
This blog shows you how to make your Windows create new text file in UTF-8 format by default when you use Right-click context menu.Preface:
At last, in the 2nd decade of this 21st Century, Unicode (especially UTF-8 format for text file) is finally getting more attention and is very commonly used nowadays.Personally, I use Windows context menu a lot to create new text files anywhere I like. It's very handy:
However, text files created in this way are in ANSI, which mean they are in whatever legacy national encoding our system is set to. In order to turn them to UTF-8 format (and that's what I'm always doing before really getting to write anything at all) is to go to File ▶ Save as... and specify the encoding. Technically speaking, saving an empty text file to UTF-8 (or any other Unicode format) simply means adding the BOM to the beginning of the files.
If we occasionally create one or two random files here and there, manually saving new files as UTF-8 is OK. But if we are to make a lot of text files, this is getting quite annoying. That's why I'm writing this procedure to resolve this problem once and for all.
Procedure:
This procedure works in Windows XP as well as in Windows 7.- First of all, make sure the account you're using has local administrator right.
How to check this will not be explained in this article. But if your account is allowed to install whatever software you like, that normally means you already have the admin right ;-)
- Open system-wide New file template folder at %Systemroot%\ShellNew.
Create this folder if it does not exist, ie open %Systemroot% and create the ShellNew sub-folder.
- Create a new text file inside the folder and give it a name, eg text.txt. Jot down this name as it will be used in step 5 below:

- Open it in Notepad and immediately save it as UTF-8:

- Edit registry such that HKEY_CLASSES_ROOT\.txt\ShellNew has a new String Value (REG_SZ) called FileName whose data is text.txt (or whatever is called in step 3)

That's it! Now, every new text file created by context menu will be in UTF-8 format.
In the rare case that this does not work, try %Allusersprofile%\Templates instead of %Systemroot%\ShellNew in step 2 above and start over again.
In the rare case that this does not work, try %Allusersprofile%\Templates instead of %Systemroot%\ShellNew in step 2 above and start over again.
