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# 4.0 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.