C# and utf8_decode

c++phputf-8utf8-decode

Is there a C# utf8_decode equivalent?

Best Solution

Use the Encoding class.

For example:

byte[] bytes = something;
string str = Encoding.UTF8.GetString(bytes);