Encodings

Since all strings in .NET are Unicode strings (see String, Char and Byte, you need to use the right encoding when reading and writing (disk, network, database).

For the Encodings please see the classes that inherit from the System.Text.Encoding class:

The Encoding class has a few very interesting static methods (please see MSDN for further details):

It may sound difficult, but it is neccessary to understand the encodings when you deal with different systems (disk, database, network). Otherwise you will corrupt your data.