From Wikipedia, the free encyclopedia
A component of Microsoft Windows
|Included with||All versions|
Notepad is a common text-only (plain text) editor. The resulting files—typically saved with the .txt extension—have no format tags or styles, making the program suitable for editing system files that are to be used in a DOS environment.
Notepad supports both left-to-right and right-to-left based languages, and one can alternate between these viewing formats by using the right or left Ctrl+Shift keys to go to right-to-left format or left-to-right format, respectively.
Early versions of Notepad offered only the most basic functions, such as finding text. Newer versions of Windows include an updated version of Notepad with a search and replace function (Ctrl + H), as well as Ctrl + F for search and similar keyboard shortcuts.
Notepad makes use of a built-in window class named "EDIT". In older versions such as those included with Windows 95, Windows 98, Windows Me and Windows 3.1, there is a 64k limit on the size of the file being edited, an operating system limit of the EDIT class.
Up to Windows 95, Fixedsys was the only available font for Notepad. Windows NT 4.0 and 98 introduced the ability to change this font. In Windows 2000 and XP the default font was changed to Lucida Console.
Up to Windows Me, there were almost no keyboard shortcuts and no line-counting feature. Starting with Windows 2000, shortcuts for common tasks like new, open and save were added, as well as a status-bar with a line counter (available only when word-wrap is disabled).
In the Windows NT-based versions of Windows, Notepad can edit traditional 8-bit text files as well as Unicode text files (both UTF-8 and UTF-16, and in case of UTF-16, both little-endian and big-endian).
Notepad accepts text from the Windows clipboard. When clipboard data with multiple formats is pasted into Notepad, the program will only accept text in the CF_TEXT format. Simple text editors like Notepad may be used to edit text with markup, such as HTML. However, because they lack many features (such as syntax highlighting), web developers may favor more specialized editors for this purpose (see List of text editors).
The Windows NT version of Notepad, installed by default on Windows 2000 and Windows XP, has the ability to detect Unicode files even when they are missing a byte order mark. To do this, it utilizes a Windows API function called
IsTextUnicode(). However, this function is imperfect, incorrectly identifying some all-lowercase ASCII text as UTF-16. As a result, Notepad interprets a file containing a phrase like "aaaa aaa aaa aaaaa" as two-byte Unicode text file and attempts to display it as such. If a font with support for Chinese is installed, Chinese characters are displayed.
A few people misinterpreted this issue for an easter egg. Many phrases which fit the pattern (including “this app can break”, “bush hid the facts” and “acre vai pra globo”) appeared on the web as hoaxes. Experts correctly attributed it to the Unicode detection algorithm.
This issue has been resolved in Windows Vista version of Notepad.
Notepad does not require a lock on the file it opens, so it can open files already opened by other processes, users or computers, whereas WordPad cannot. Also, since Notepad lacks advanced formatting functionality, many people find its simple interface faster and easier to use for basic text operations. The DOS EDIT text editor, especially as updated in Windows 95, where it became an MDI application, also provides many features never offered by Notepad.
- Notepad in Windows XP Product Documentation at Microsoft.com
- Notepad FAQ in Windows Vista documentation at Microsoft.com