Skip to content

Instantly share code, notes, and snippets.

@kiwijunglist
Created August 12, 2013 11:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kiwijunglist/6210086 to your computer and use it in GitHub Desktop.
Save kiwijunglist/6210086 to your computer and use it in GitHub Desktop.
Translate unicode html string to normal text
Str := "Вселенная 4 се
зон. Что падае
т из космоса"
msgbox % Translate(str)
Translate(Str)
{
NewStr := Str
Pos = 1
Loop
{
Pos := regexmatch(str,"&#(\d*);",X,Pos)
Transform, Y, chr, X1
X := "&#" . X1 ";"
Pos++
StringReplace, NewStr, NewStr, %X%, %Y%
} until Pos = 1
Return NewStr
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment