Sample code for 30+ languages & platforms
Visual Basic 6.0

HTML Entity Encode and Decode in StringBuilder

Demonstrates HTML encoding and decoding the contents of a StringBuilder.

Chilkat Visual Basic 6.0 Downloads

Visual Basic 6.0
Dim sb As New ChilkatStringBuilder

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

success = sb.Encode("html","utf-8")
Debug.Print sb.GetAsString()

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

' To decode:
success = sb.Decode("html","utf-8")
Debug.Print sb.GetAsString()

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