I’m trying to remove an encoded TM sign from a PHP string which is displayed as a a page title. The character displays as ™ in the title, which is obviously ugly. Unfortunately none of the inbuilt encoding functions seem to deal with translation of very many encoded characters, and TM isn’t one of them. What I want to do is replace ‘™’ with ‘(tm)’.
Before I dig into substrings I wanted to see if anyone knew of a cleverer way to do this. I don’t know the position the symbol appears in the string (it varies depending on the page title).
Any thoughts much appreciated!
What about this:
Actually I don´t know is it the best way to do this, but at least it works.