I want every document that I create or open in Notepad++ to always (no matter what) be encoded in UTF-8. It seems, that either I'm missing something or this is not possible.

In Settings > Preferences... > New Document > Encoding I have UTF-8 without BOM selected in the list plus Apply to opened ANSI files checked as well. I'm using version 6.7.4.

Everyhing is fine, when I create a new file directly in Notepad++. Then, yes, it has UTF-8 w/o BOM encoding set by default. But, when I select New > Text Document in Windows Explorer, create a new empty text file and then double click it, it opens in Notepad++ with ANSI encoding by default.

What is wrong? For me, option Apply to opened ANSI files seems to be not working at all.

  • 1
    Perhaps you need to realize that (what Windows incorrectly calls) ANSI and UTF-8 are identical if your text doesn't contain any actual explicit UTF-8 characters. So if Notepad++ opens it and detects its character endoding, it doesn't really matter if it's UTF-8 or "ANSI" if the file is pure ASCII (as in, for instance, English text, or usually, source code). – tripleee Mar 2 '15 at 7:58
up vote 4 down vote accepted

Nothing is wrong. It is just, how Notepad++ is working. Files are actually saved as UTF-8 w/o BOM.

Whenever an ANSI-encoded text file is opened in Notepad++, editor displays its correct encoding (ANSI). However, after actually saving that file, it will be saved as UTF-8 w/o BOM, if Apply to opened ANSI files option is checked. To verify this, one must create a new text file in the Windows Explorer, open it in Notepad++, change contents, save and reopen. It will be recognized as encoded in UTF-8 w/o BOM.

Tip: There's a fairy easy way to force Windows Notepad to always save files in UTF-8:

It requires some tweaks in Windows registry, but allows you to have all files always encoded in UTF-8, no matter, what editor you're using.

  • I was really excited but then your link didn't work. Maybe you were linking to something similar to this? superuser.com/a/872848/74576 – Ryan Aug 19 '16 at 19:06
  • @Ryan Link in my answer works for me, however target page opens up very slowly. I have added both link to make sure future readers reach information, they're seeking for. – trejder Aug 27 '16 at 19:29

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.