Sample code for 30+ languages & platforms
Xojo Plugin Requires Chilkat v11.1.0+

HTML Entity Encode and Decode in StringBuilder

Demonstrates HTML encoding and decoding the contents of a StringBuilder.

Chilkat Xojo Plugin Downloads

Xojo Plugin
Dim sb As New Chilkat.StringBuilder

Dim s As String
s = "< é ü ç Ω Hello & World ✓ >"
Dim success As Boolean
success = sb.Append(s)

success = sb.Encode("html","utf-8")
System.DebugLog(sb.GetAsString())

//  Output:
//  < &eacute; &uuml; &ccedil; &ohm; Hello & World &check; >

//  To decode:
success = sb.Decode("html","utf-8")
System.DebugLog(sb.GetAsString())

//  Output:
//  < é ü ç Ω Hello & World ✓ >