如何设置文本文件的默认保存编码为UTF-8

原文:http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_programs/default-utf-8-encoding-for-new-notepad-documents/525f0ae7-121e-4eac-a6c2-cfe6b498712c?auth=1

 

1. Right click -> New -> Text Document
2. Open "New Text Document.txt". Do NOT type anything!
3. Go to "File -> Save As... " and choose UTF-8 under "Encoding:", press "Save" and overwrite existing file. Close the file.
4. Rename "New Text Document.txt" to "TXTUTF-8.txt"
5. Copy "TXTUTF-8.txt" to "C:\WINDOWS\SHELLNEW"
6. Go to "Start -> Run..." and type
---------
regedit
---------
Press OK.
7. Navigate to
-------------------------------------------
HKEY_CLASSES_ROOT\.txt\ShellNew
-------------------------------------------
8. Right click in the right window -> New -> "String Value" and rename it to
-----------
FileName
-----------
9. Double click on "FileName" and put
----------------
TXTUTF-8.txt
----------------
into "Value data:" field and press OK.
10. It's finished.
11. Test it: Create new .txt document (Right click -> New -> Text Document). Open it and go to "File -> Save As... " and see that encoding is set by default to UTF-8 . :-)

posted @ 2016-04-29 20:43  陈希章  阅读(5489)  评论(0编辑  收藏  举报