You have a web application that generates JSON dynamically from the data in your database, which probably comes from the cloud. Your data might have some weird strings, like U+2028 the Unicode LINE SEPARATOR character.
When you use Perl's JSON::XS, or probably other JSON encoder modules as well, it gives you an UTF-8 JSON data like this:
Note that this [\xe2\x80\xa8] stands for 3-byte strings that represent UTF-8 encoding of one character U+2028. I think this is a valid JSON UTF-8 representation, but since jQuery uses browser's built-in eval() function to parse JSON, this JSON data can't be parsed with Safari and Firefox. You can confirm that by pasting this to your Location bar.
There's a couple of workarounds to this. The easiest is to escape high-bit characters as \uXXXX notation in the server side. In JSON::XS it's as simple as JSON::XS->new->ascii->encode($data); intead of ->utf8. This is a little weird to use this option since this changes ALL non-ascii characters in \uXXXX not only these "special" characters like U+2028, but it's probably the most straightforward anyway.
The other fix would be not using jQuery's native JSON parser which is just eval(). Instead you get the text data using dataType: 'text' and use token-based JSON decoder like Crockford's. There might be JSON plugins to do this as well. jquery-json has evalJSON() method but hm, this seems to use eval() as well. And that approach would slow the parsing significantly anyway.
A couple of my friends on IRC have told me this, and since I'm using 10.4.11 I couldn't verify, but the latest Mac OS X Security Update 2009-001 apparently breaks your Perl, if you
are using Mac OS X 10.5 (Leopard)
and are using Perl that comes with Mac OS X
and have upgraded several core modules with CPAN in the past
In other words, it doesn't break yours if you a) haven't ever used CPAN with your perl, b) are on Tiger like me or c) have built Perl yourself, or are using other Perl like MacPorts one.
Once your Perl gets broken, you'll see errors like this:
% perl -MIO
IO object version 1.22 does not match bootstrap parameter 1.23
Compilation failed in require.
BEGIN failed--compilation aborted.
This is because the Security Update brings (old) IO.bundle with version 1.22 but your IO.pm has been updated to the latest 1.23 on CPAN shell. (But hey, 1.23 was released in 2006 ... Why do you bring that ancient version back, Apple!?)
The fix is to update IO.pm to 1.23, but since IO.pm is now broken, you can't even run CPAN shell to do this (Ugh!). You need to go to CPAN and grab IO-1.2301.tar.gz, unpack it and run "perl Makefile.PL; make; sudo make install" to fix this. You probably need to do the same against Scalar::Util and Storable.
This is another reason why you shouldn't use Perl that comes from vendors (Apple isn't any different from Fedora on this!) or use stuff like local::lib to keep system modules clean.