Whenever I use certain unique characters such as ™ the page outputs this symbol:
How can I convert these characters so that they can be displayed normally on the page?
I'm currently using this PHP, but it removes the characters instead of converting them into characters that can be displayed normally:
function convert_to($str, $target_encoding = "UTF-8") {
$encoding = mb_detect_encoding($str, "auto");
$target = str_replace("?", "[question_mark]", $str);
$target = mb_convert_encoding( $target, $target_encoding, $encoding);
$target = str_replace("?", "", $target);
$target = str_replace("[question_mark]", "?", $target);
return $target;
}