shai Posted February 20, 2017 Share Posted February 20, 2017 (edited) sometimes user type hebrew but the keyboard is on english mode so it get wrong text (its called gibrish) with this function you can easy convert worng text to readable hebrew. maybe it is be helpful to other users here Func gibrish_to_hebrew($string) Local $aArray[31][2] = [['t', 'א'],['c', 'ב'],['d', 'ג'],['s', 'ד'],['v', 'ה'],["u", 'ו'],['z', 'ז'], _ ['j', 'ח'],['y', 'ט'],['h', 'י'],['f', 'כ'],['l', 'ך'],['k', 'ל'],['n', 'מ'], _ ['o', 'ם'],['b', 'נ'],['i', 'ן'],['x', 'ס'],['g', 'ע'],['p', 'פ'],[';', 'ף'], _ ['m', 'צ'],['.', 'ץ'],['e', 'ק'],['r', 'ר'],['a', 'ש'],[',', 'ת'],['/', '.'], _ ["'", ','],['q', '/']] Local $agibrish = StringRegExp($string, "(.)", 3) Local $sRet = "" For $i = 0 To UBound($agibrish) - 1 Local $match = False For $x = 0 To UBound($aArray) - 1 If $aArray[$x][0] = $agibrish[$i] Then $match = True $sRet &= $aArray[$x][1] EndIf Next If Not $match Then $sRet &= $agibrish[$i] Next Return $sRet EndFunc Edited February 20, 2017 by shai Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now