I\'m using mysqli_real_escape_string() on an email address, and it returns an empty string. It does this with any email address.
I had this problem and found that my character set was set to latin. Solved by putting
$con->set_charset("utf8");
before the real_escape_string. Would be mysqli_set_charset in procedural style.