In a MySql text column there is a trademark ™ symbol which is displayed in an html textarea field and looks correct.
A change is made to the textarea data and it is submitted via jQuery. When it arrives in PHP it appears to be translated to \u2122 and gets updated in mysql that way. When that data is now retrieved to the web page it appears as â„¢ which is even more different.
I’m sure it’s an encoding/decoding thing but I don’t know much about that yet. I’ve tried various encode/decode functions on the javascript side and the PHP side but can’t seem to figure it out.
Can anyone point me in the right direction?
Unicode Character ‘TRADE MARK SIGN’ (U+2122)
Take a look at the following links:
Unicode and Other Funny Characters (this one helps to explain the encoding thing you don’t know much about yet. 🙂 )
Harmonizing Character Encoding Between Imported Data and MySQL
updating trademark symbol in mysql db using CF 8
Retrieve Trademark symbol from mysql database
Trademark Symbol In Database