$Decoded = _HTMLDecode("Герой пьян")
ConsoleWrite($Decoded & @LF)
Func _HTMLDecode($Str)
Local $Decoded, $X1, $X2
If $Str = '' Then Return ''
$X1 = StringRegExp($Str, '&#x(.*?);', 3)
$X2 = StringRegExp($Str, '&#(.*?);', 3)
For $i = 0 To UBound($X1) - 1 Step 1
$Str = StringReplace($Str, '&#x' & $X1[$i] & ';', ChrW(Dec($X1[$i])))
Next
For $i = 0 To UBound($X2) - 1 Step 1
$Str = StringReplace($Str, '&#' & $X2[$i] & ';', ChrW($X2[$i]))
Next
$Decoded = $Str
Return $Decoded
EndFunc