views:

36

answers:

1

How can I convert/export binary data (for example binary files like excel- or word-documents) into a string (into text format) in .NET, so that it can be imported somewhere else (e.g. in another application, which was written in another programming language (not in .NET)). Are there universal concepts to achieve this goal ?

+4  A: 

The most common form is to use Base64 encoding between binary and text. .NET supports this with Convert.ToBase64String and Convert.FromBase64String.

Base64 is widely supported, and is a common way of encoding binary data in pure ASCII, encoding 3 bytes into 4 characters (repeatedly).

Jon Skeet