For security reasons I wanted to add a function to turn strings to safe format by using the code below. in normal English characters it works fine, but when i use Amharic characters like ከበደ
I am getting different string like ከበደ
, what shall I do.
echo safestring("ከበደ");
//the string after echo is absolutely changed
function safestring($str){
//make the string from SQL injection
$str = htmlentities($str);
$str= mysql_real_escape_string($str);
return $str;
}