I have an script that i want to change to Persian but this script has written by my colleague and he used htmlentities without utf-8 as argument.
I decided to use override_function and runkit , i managed to install runkit on my php and it works but cant figure out how to change this
htmlentities(LABEL__MAIN_INDEX_ADMIN, ENT_QUOTES)
to
htmlentities(LABEL__MAIN_INDEX_ADMIN, ENT_QUOTES , "UTF-8")
i know that i can use override to change htmlentities so when i call it utf-8 will be added automatically ! please help me
i found the answer !
runkit_function_copy('htmlentities','htmlentities2'); runkit_function_redefine ('htmlentities', '$string,$compat=NULL,$enc="UTF-8"', 'return htmlentities2($string,$compat,$enc);');
this works like charm !! thanks anyway !