PHP, JSON and \u-somethings -
i'm using php 5.2. file , db table utf8.
when insert column json_encoded data in it, converts non-ascii chars \u-something. ok. when json_decode data \u-somethings still there!
wasn't json_decode supposed convert normal chars when displaying on utf8 page. example, instead of f\u00f6tter, should display fötter. have use function conversion?
json_encode , json_decode kind of weak in php. both minimum produce valid, not intended output. json_decode has no idea if \u00f6 supposed ö
or \u00f6
. there no way make json_decode aggressively convert unicode characters back. remember json designed directly eval'able javascript, , javascript evaluate escapings.
but why json encoding data store in mysql?
Comments
Post a Comment