You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're venturing into areas that aren't my strength here, but I don't believe this is a bug. If looks like you're inserting 4 unicode characters into the database, but the encoding on the database doesn't recognize it so when mysqli_real_escape_string processes it, it removes the slash as it normally would.
The solution, if I'm right, is to change the database to use utf8 encoding. If that doesn't work try utf8mb4 (which is necessary if you're doing things like emoticons).
I researched this a while back and every thing needs to be DEFAULT CHARSET utf8 for the COLLATION it needs to be utf8_general_ci or for better encoding utf8_unicode_ci
`
$array = '{"\u56fe\u4e66\u7cfb\u7edf"}';
$this->db->table('aaa')->where('id', 1)->update(['array' => $array]);
`
The result in the database is {"u56feu4e66u7cfbu7edf"}
The text was updated successfully, but these errors were encountered: