PowerShell
PowerShell
HTML Entity Encode and Decode in StringBuilder
Demonstrates HTML encoding and decoding the contents of a StringBuilder.Chilkat PowerShell Downloads
Add-Type -Path "C:\chilkat\ChilkatDotNet47-x64\ChilkatDotNet47.dll"
$sb = New-Object Chilkat.StringBuilder
$s = "< é ü ç Ω Hello & World ✓ >"
$sb.Append($s)
$sb.Encode("html","utf-8")
$($sb.GetAsString())
# Output:
# < é ü ç Ω Hello & World ✓ >
# To decode:
$sb.Decode("html","utf-8")
$($sb.GetAsString())
# Output:
# < é ü ç Ω Hello & World ✓ >