Character Encoding
Definitions
A code page, or character set, is a collection of characters. Historically, characters from different languages were divided into different character sets, because computers could only “address” a limited number of characters at a time. Code pages were therefore defined to support specific languages, or groups of languages with similar writing systems. For instance, code page 1251 contains the characters of both the Bulgarian and the Russian alphabets.
Legacy character encodings use Single-Byte Character Sets (SBCS) or Multi-Byte Character Sets (MBCS), also known as Double-Byte Character Sets (DBCS). An SBCS contains 256 character codes, while a DBCS mixes single-byte and double-byte characters and can represent up to 65,536 characters.
Modern character encodings, such as UTF-8 and UTF-16, are based on Unicode, which assigns a unique number to every character used throughout the world. Each Unicode code point refers unambiguously to a given character. Compared to an SBCS, Unicode covers a considerably larger range of characters; compared to an MBCS, it offers a simpler model for working with text.
Selecting a Character Encoding
DeltaWalker Classic is Unicode-based and automatically detects the character encoding of a text file. Unicode encodings are often easy to detect thanks to a leading byte order mark (BOM), while single-byte character sets do not lend themselves well to automatic detection. If a character encoding is detected incorrectly, many, or even all, characters appear garbled and unreadable.
If DeltaWalker Classic cannot detect the character encoding of a file correctly, you can select it yourself in several places:
- The Select Character Encoding dialog, which you open with Reopen with Encoding… in the context menu of a text editor once the file is open for comparison.
- The Save File dialog, if you want to change the character encoding of a file just before saving it.
- The Select File dialog on Windows, when browsing for the file to open.
DeltaWalker Classic lets you select a character encoding either by the language that uses it or by the name of the encoding itself. Several languages can use the same character encoding, and some encodings have no corresponding language. Therefore, when you switch from Languages to Encodings, DeltaWalker Classic always maps the current language to its corresponding encoding, but not the other way around.
The Text Editing page of the Settings window (Settings > Application > Text Editing) lets you select the default encoding—language or encoding—for new text files created in DeltaWalker Classic. Unless you change it, for instance in the Save File dialog, a new file is saved with the default encoding.