CkPython
CkPython
HTML Encoding
Demonstrates HTML encoding and decoding.Chilkat CkPython Downloads
import chilkat
crypt = chilkat.CkCrypt2()
s = "< é ü ç Ω Hello & World ✓ >"
htmlEncoded = crypt.encodeString(s,"utf-8","html")
print(htmlEncoded)
# Output:
# < é ü ç Ω Hello & World ✓ >
# To decode:
s = crypt.decodeString(htmlEncoded,"utf-8","html")
print(s)
# Output:
# < é ü ç Ω Hello & World ✓ >