I'm using JQuery to serialize and post form values to a PHP/MySQL server, and the form textarea contains text and emojis as HTML entities:
<textarea>Hello 😀 and goodbye</textarea>
The server receives:
Hello \ud83d\ude00 and goodbye
However, only "Hello" gets stored in the database correctly. The emoji/entity and any text after it disappear. The database gets:
Hello
Everything is UTF-8 throughout.
What's the right way to parse this into something that can be stored and then returned back into HTML in a way that it renders properly? I must be overlooking something simple.