Created
August 12, 2013 11:28
-
-
Save kiwijunglist/6210086 to your computer and use it in GitHub Desktop.
Translate unicode html string to normal text
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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