C#
C#
HTML Encoding
Demonstrates HTML encoding and decoding.Chilkat C# Downloads
Chilkat.Crypt2 crypt = new Chilkat.Crypt2();
string s = "< é ü ç Ω Hello & World ✓ >";
string htmlEncoded = crypt.EncodeString(s,"utf-8","html");
Debug.WriteLine(htmlEncoded);
// Output:
// < é ü ç Ω Hello & World ✓ >
// To decode:
s = crypt.DecodeString(htmlEncoded,"utf-8","html");
Debug.WriteLine(s);
// Output:
// < é ü ç Ω Hello & World ✓ >