I am storing a registered trademark symbol with a product name in a mysql table. The table is utf8 unicode. When I render the page using Smarty templates I see Product®
when I should be seeing Product®
.
After stepping through I can see the right before the template is rendered the variable looks like Product®
but after render it adds the strange Â
character. I also tested this by using the php utf8_encode()
and can visibly see the character being added after the encoding.
How do I strip this character and render so it isn't shown. I've tried something like this:
$product= str_replace('®', '®', $product);
$product= html_entity_decode($product);
But still see the strange Â
character show up in the product name. I have seen different issues on SO regarding a similar character but now solutions as to how to deal with it.