MySQL更新/插入条带反斜杠的unicode条目

I'm trying to insert/update a SQL field with JSON data that encodes unicode as \u, but it's stripping it out:

"Sauteéd -> ["Saute\u00e9d"]

However, it's being saved in the database like this:

["Sauteu00e9d"]

I've tried countless preg_replace and str_replace methods, but none of them work. Is there something I can do about this - it's driving me mad.

Thanks!

Use mysql_real_escape_string if you aren't.

My guess is that you use PHP

In that case you should use mysql_real_escape string instead of preg replace. It's easier and much better against SQL injections.