...

/

Encoding, Decoding, and Random Access Handle

Encoding, Decoding, and Random Access Handle

Learn about text encoding in computers, different text encodings used in .NET, and random access handle, which allows working with files without needing a traditional file stream.

Text character representation

Text characters can be represented in different ways. For example, the alphabet can be encoded using Morse code into a series of dots and dashes for transmission over a telegraph line.

Text encoding in computer

Similarly, text inside a computer is stored as bits (ones and zeros) representing a code point within a code space. Most code points represent a single character but can have other meanings, such as formatting. For example, ASCII has a code space with 128128 code points. .NET uses a standard called Unicode to encode text internally. Unicode has more than one million code points.

Encoding in .NET

Sometimes, we will need to move text outside .NET for use by systems that do not use Unicode or a variation of Unicode, so it is important to learn how to convert between encodings. The ...