File page

From TED Notepad
This section is up to date for TED Notepad version 6.3.1.0.
Control page Control:dialog:Settings:File

Default encoding

The Default encoding specifies default Encoding to be used for new documents, or in cases where detection of encoding of a file being loaded is indecisive (e.g. if loading pure ASCII file, encoding can be both Default encoding: ANSI and Default encoding: UTF-8).

Supported encodings are:

The Default encoding: Add BOM (UTF-8 / Unicode extends some encodings with BOM and non-BOM variants. Note: While some encodings do not allow BOM at all (e.g. ANSI), other encodings recommend using BOM (e.g. both Unicodes), and some encodings make BOM optional (e.g. UTF-8).

Important note: If BOM is recommended for some encoding, omitting it is allowed, but might result in inability to auto-detect correct file encoding upon future file loading. This is especially true with Unicode files. See File Open for further details.

Default newlines

The Default newlines specifies default type of Newlines to be used for new documents, or in cases where detection of newlines of a file being loaded is indecisive (e.g. if loading file with no newlines).

Supported types of newlines are:

See Newlines for further details on when and how Newlines are used within TED Notepad.

Dialogs

The Default file type specifies, what file extension is to be used by default in the Save As dialog, if no file extension is specified explicitly. This default file extension may not exceed 4 characters.

Tip: The default file extension for plain-text documents is txt, but users may choose to override this with another value. For example, use html, if creating HTML documents more often than plain-text files.

The Default path defines relative or absolute path, which is to be used as a starting point in the Open and Save As dialogs. If absolute path is specified, it is used unmodified in all cases.

If relative path is specified (e.g. . or \docs), it refers to current working directory. Note: The current working directory is usually the directory which TED Notepad was started from. Also note that the current working directory no longer changes with every Open and Save As dialog operations as it did in previous versions of TED Notepad. The current working directory stays the same throughout the entire instance session.

If no path is specified as Default path, the current working directory is used if it contains files which satisfy Filter strings patterns described below. Otherwise, personal files directory of the current user is used as starting point.

Tip: A useful example for portable usage is simple back-slash (\) as Default path, which makes the Open and Save As dialogs start in the root directory of the drive, from which you originally launched the application. This can be used to twist the USB drive around, while moving TED Notepad on the USB drive from one computer to another. Note: One of the requirements for this to work, is to use correct working directory upon launching TED Notepad from the USB drive. In most typical cases, the system uses the USB drive as the working directory (as expected). However, some file managers and portable launchers may need to be told what working directory to use explicitly. Set them to use the USB drive.

The Filter strings define filters, which are to be used in the Open and Save As dialogs as file filters. These filters appear in a combo-box, usually bellow the file name box. A filter consists of two strings separated by Pipe character (|).

The first string in a filter is a name to be displayed, which describes the filter (e.g. Text Files). The second one specifies a filtering pattern (e.g. *.txt). A filter for text files could look like Text Files|*.txt or Text Files (*.txt)|*.txt.

To specify multiple filtering patterns for single filter, use semicolon to separate the patterns (e.g. *.txt;*.doc;*.bak). Filtering pattern can be a combination of valid filename characters and an asterisk wildcard character. Do not include spaces in the pattern string.

Several filters are to be delimited by a Pipe character (|). Therefore Filter strings value should eventually consist of pairs of strings delimited by Pipe characters. Each pair defines one filter: a name and its filtering pattern.

The Suggest first line as new file name specifies, whether text from the first non-empty line of the document is to be suggested in the Save As dialog as a new file name instead of the default Untitled. Note: Characters unallowed in file names are automatically converted into dashes.