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

HTML Encoding

Demonstrates HTML encoding and decoding.

Chilkat B4X Downloads

B4X
Dim crypt As ChilkatCrypt2
crypt.Initialize("crypt")

Dim s As String = "< é ü ç Ω Hello & World ✓ >"

Dim htmlEncoded As String = crypt.EncodeString(s, "utf-8", "html")
Log(htmlEncoded)

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


'  To decode:
s = crypt.DecodeString(htmlEncoded, "utf-8", "html")
Log(s)

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