Re: Services_JSON

From: Date: Sat, 03 May 2008 14:36:48 +0000
Subject: Re: Services_JSON
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-49987@lists.php.net to get a copy of this message
Daniel O'Connor wrote:
Yes I know there is a built in module with PHP5, but it's handling of utf8 failures can be problematic... (this little package is very handle for dealing with very dirty data...)
    
The UTF8 problems - are these things that are likely to be fixed in PHP itself anytime soon? The fundimental problem is how to handle invalid UTF characters when it needs to encode them into JSON.
There are a number of ways it could be handled: a) Throw exceptions / errors b) Output empty strings b) Replace Invalid characters with '?' (or similar) I cant remember what the end result was with ext/json, but It was one of a) or b) For my quick fetch and dump to browser requirements c) is more usefull. The only feedback I got to deal this situation was along the lines of pass it through iconv (with the ignore flag) first. Regards Alan

« previous php.pear.dev (#49987) next »