Sample code for 30+ languages & platforms
PowerShell

HTML Encoding

Demonstrates HTML encoding and decoding.

Chilkat PowerShell Downloads

PowerShell
Add-Type -Path "C:\chilkat\ChilkatDotNet47-x64\ChilkatDotNet47.dll"

$crypt = New-Object Chilkat.Crypt2

$s = "< é ü ç Ω Hello & World ✓ >"

$htmlEncoded = $crypt.EncodeString($s,"utf-8","html")
$($htmlEncoded)

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

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

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