htmlentities has a 3rd argument = the charset to use ie
htmlentities($string,ENT_COMPAT,"UTF-8");
Geek Num 88
2010-05-18 02:38:10
htmlentities has a 3rd argument = the charset to use ie
htmlentities($string,ENT_COMPAT,"UTF-8");
I used the filter extension:
$url = filter_var($url, FILTER_SANITIZE_STRING, FILTER_FLAG_ENCODE_HIGH)
Before use it. This makes a better result than any other solutions I've tried (bcoz it's RFC compliant).