@Alan-Kilborn said:
But it isn’t exactly obvious what its function is, based only upon the UI text.
@MarkusBodensee said:
Yes, exactly what I thought while taking the screenshots
The option is on the “New Document” panel, no doubt, because it is only available when the default encoding for new documents is set to UTF-8.
Yet it doesn’t apply to new documents, it applies to existing files.
What is really means is, when Notepad++ opens an existing file that contains only ASCII characters, it should treat it as UTF-8 rather than as ANSI.
Which, for me, raises the question: Why is this only available when UTF-8 is the default encoding for new files?
Background in case anyone reading this doesn’t know:
ASCII comprises 128 codes, from 0-127. All the characters on a standard US keyboard are ASCII, but most languages other than English use characters that ASCII lacks.
UTF-8 is a standard method for encoding Unicode, a set of over one hundred thousand characters that includes very nearly every character needed for every known language.
ANSI refers to any of several dozen legacy “code pages” that were used in Windows to support different languages before Unicode was developed. These encodings are still in common use. In Notepad++, ANSI always refers to the “system default code page,” the one the Windows system on which Notepad++ is running recognizes as the “normal” encoding for files on that system. The specific code page that is default varies by country.
The first 128 codes in all ANSI code pages and in UTF-8 are the same as the 128 ASCII characters.
Because of all this, when opening a file that contains only ASCII characters, there is no way to distinguish whether it is ANSI or UTF-8 (or some code page other than the system default code page). The results are identical.
When Notepad++ loads a file into an editing area, it has to determine which encoding to use. For a pure ASCII file, it will only matter if and when you edit the file by adding characters that are not in the ASCII range. Once you do that, the results will differ depending on which encoding was chosen.
This setting lets you tell Notepad++ whether it should load pure ASCII files so that, if you add non-ASCII characters to them, they will wind up as ANSI, or so that they will wind up as UTF-8.