Is there a way on C# that I can convert unicode strings into ASCII + html entities, and then back again? See, in PHP, I can do it like so:
Here are some examples of conversions. The first two show how to convert, the last one can be turned into a function that takes two encoding names as strings, and convert.
A list of encoding names can be found here.
Encoding.UTF8.GetString(Encoding.ASCII.GetBytes(str));
Encoding.UTF8.GetString(Encoding.Unicode.GetBytes(str));
Encoding.GetEncoding("UTF-8").GetString(Encoding.GetEncoding("ASCII").GetBytes(str));