Share via

Default UTF-8 encoding for new Notepad documents

Anonymous
2010-04-27T22:42:11+00:00

Short of using a third party editor, is there a way to configure Notepad so that new documents are automatically saved in Unicode without having to change manually the encoding every single time from default ANSI to UTF-8?

Typical scenario:

  • Start typing some text with no extended characters
  • Save the file: It is automatically in ANSI
  • Open the file again to edit, add some extended characters, save again:

  Notepad tells you the extended characters will be lost if you confirm the save operation.

At least that last message offers the possibility to backup and "Save as" to choose UTF-8, but 1) this is very cumbersome, and 2) files with no extended characters will still be saved in ANSI by default.

Windows won't really be fully Unicode if the default Notepad encoding is still the obsolete ANSI code page, but, even if I reluctantly admit changing default behaviors is tricky for compatibility reasons, there should at least be a user option to select the default encoding for new documents, like other third party editors offer, such as Notepad++.

Currently, Windows forces me to replace Notepad file associations to use other text editors. Not a bad thing given the poor set of features in Notepad, but it would have been great to have this option in the standard O.S.

Windows for home | Previous Windows versions | Apps

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
  1. Anonymous
    2010-05-12T01:50:00+00:00
    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.

    1. Navigate to

    HKEY_CLASSES_ROOT.txt\ShellNew


    1. Right click in the right window -> New -> "String Value" and rename it to

    FileName


    1. Double click on "FileName" and put

    TXTUTF-8.txt


    into "Value data:" field and press OK.

    1. It's finished.
    2. 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 . :-)

    Credits go to Robert Clemenzi and his explanation of "FileName" string (and its linkage with "Template directory") within registry:

    http://mc-computing.com/WinExplorer/WinExplorerRegistry\_ShellNew.htm

    NOTE: These steps are ONLY for creating new and blank UTF-8 .txt documents. If .txt is already saved with ANSI encoding, it will stay ANSI when saving it next time - so if UTF-8 is needed (in this case), it must be set manually.

    P.S. Also change "fSavePageSettings" & "fSaveWindowPositions" DWORD values to "1" within following registry key:

    HKEY_CURRENT_USER\Software\Microsoft\Notepad

    Info: http://www.pc1news.com/saving-changes-to-notepad-configuration-1216.html

    200+ people found this answer helpful.
    0 comments No comments

48 additional answers

Sort by: Most helpful
  1. Anonymous
    2017-08-29T12:54:30+00:00

    Hi there,

    I realize it's been a long time since this was posted, but, I'm now in the same situation, trying to change the encoding of Notepad to UTF-8 on Windows 10 64 bits.

    The problem I'm facing is, I cannot find the folder "SHELLNEW" anywhere.

    I do, however, see a different folder in Windows Folder called: "ShellExperiences"

    Any advice would be greatly appreciated, as I really need to put an end to this annoying issue on NotePad.

    Thank you,

    Dan

    2 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2012-03-17T18:02:23+00:00

    Hi MR.Racs,

    There's a simple way to do this:

    1- Open notepad and don't type anything;

    2- Go to File>Save As...;

    3- In "File name" field type "Untitled.txt";

    4- Under "Encoding" choose "UTF-8";5- Save file in a safe place;

    6- Go to the folder where you saved the file;

    7- Right click on it and choose "Properties";

    8- In "General" tab check the "Read-only" checkbox and press "OK";

    9- Again right click on it and choose "Create Shortcut";

    10- Rename the "Untitled - Shortcut.lnk" to "Notepad.lnk";

    11- Right click on "Notepad.lnk" and choose "Properties";

    12- In the "Shortcut" tab click on "Change Icon...";

    13- Under "Look for icons in this file:" type the path of "notepad.exe" which is "%windir%\system32\notepad.exe" and press "OK" twice;

    14- Confirm the "Properties" window by pressing "OK";

    15- Put the "Notepad.lnk" anywhere you like and use it instead of Notepad.

     

    This is great - but be aware that it won't work if you drag that Notepad.lnk to the Quick Launch bar. Windows 7 replaces it with a generic link to Notepad.exe, with ANSI specified as the standard file format.

    2 people found this answer helpful.
    0 comments No comments
  3. Anonymous
    2012-03-01T08:23:55+00:00

    Thanks, but I reported in my 1st post that I had followed those exact steps twice.  Once on my older system, and once on my new system.

    The steps provided in the previous thread by liuchang are identical (copy/paste) to the steps provided by Maneuver on May 11, 2010.

    However, when I tried the steps offered by IRIman I found success.

    Thanks for the followup.

    2 people found this answer helpful.
    0 comments No comments
  4. Anonymous
    2013-07-23T20:23:18+00:00

    !!!!!!!!!!!!!!!!!!!!!! ****

    !!!!!!!!!!!!!!!!!!!!!! ****

    !!!!!!!!!!!!!!!!!!!!!! ****

    There is a simple fixer, to set UTF8 as default for notepad -

    !!!!!!!!!!!!!!!!!!!!!! ****

    !!!!!!!!!!!!!!!!!!!!!! ****

    !!!!!!!!!!!!!!!!!!!!!! ****

    !!!!!!!!!!!!!!!!!!!!!! ****

    http://www.softpedia.com/get/System/OS-Enhancements/Notepad-Default-UTF-8-Unicode-Creator.shtml

    !!!!!!!!!!!!!!!!!!!!!!

    !!!!!!!!!!!!!!!!!!!!!! ****

    !!!!!!!!!!!!!!!!!!!!!! ****

    !!!!!!!!!!!!!!!!!!!!!! ****

    Dear Modernshoppers

    I can't believe I went through the excruciating process of signing up for the useless parasite microsoft just to say thank you for your solution. 

    you know what it likes when you destined for solving a bug like this out of thousands in the pile of sh*t which Microsoft forced every one to accept as an operating system. It's irritating! Thank you for sparing me.

    1 person found this answer helpful.
    0 comments No comments