Text Encoding

One final important aspect of working with text is the plethora of representations that exist out there when it comes to sending text across different (sub)systems. Although the .NET platform as a whole—including languages, frameworks, runtime, and tools—has standardized on Unicode as the representation of strings, plenty of systems deal with other formats such as ASCII or different UTF representations.

The System.Text namespace supports various encoding schemes that can be used from the Encoding class’s static properties. Including Unicode, ASCII, UTF7, and a few others, those return objects of Encoding derivatives. Through those objects, you get access to encoder and decoder objects, among various other encoding-related properties ...

Get C# 5.0 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.