Sample code for 30+ languages & platforms
Visual FoxPro

HTML Entity Encode and Decode in StringBuilder

Demonstrates HTML encoding and decoding the contents of a StringBuilder.

Chilkat Visual FoxPro Downloads

Visual FoxPro
LOCAL loSb
LOCAL s

loSb = CreateObject('Chilkat.StringBuilder')

s = "< é ü ç Ω Hello & World ✓ >"
loSb.Append(s)

loSb.Encode("html","utf-8")
? loSb.GetAsString()

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

* To decode:
loSb.Decode("html","utf-8")
? loSb.GetAsString()

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

RELEASE loSb