JSON Data Could Not be Parsed - IE Only?

JSON Data Could Not be Parsed - IE Only?

schotzschotz Posts: 3Questions: 0Answers: 0
edited July 2013 in DataTables 1.9
Hi all,
I have a new twist on this error that I can seem to find any threads on. My datatables implementation works correctly in Firefox but not in IE (using 9). I'm using server-side processing and I've run my JSON through JSlint and it clears. I've also run through the debugger: http://debug.datatables.net/efuciv and nothing stands out, at least to me, although I can also only get the debugger to work in Firefox. When I try to run it in IE after the errror, it just hangs on 'Uploading data to the server'

Thanks in advance...

Replies

  • schotzschotz Posts: 3Questions: 0Answers: 0
    Figures that I would find the problem right after I posted...the data returned contained a special character ( é ). Once I removed it, the IE version worked fine.
    I find it strange that IE has a problem with this but Firefox doesn't and the JSlint is fine. I don't know much about special characters in MySQL, JSON and browsers. Any thoughts on the best way around this?
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Very odd! Any UTF-8 character should work okay in IE. Is it UTF8 encoded?

    Allan
  • schotzschotz Posts: 3Questions: 0Answers: 0
    The page that is receiving the JSON is UTF-8. Would I need to encode the JSON somehow?

    I'm dynamically creating the JSON and returning it via PHP using echo '{JSON content here}' in the source script.

    If there's a safer/better way, please let me know.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    No you shouldn't need to make any changed. I'm afraid I don't understand why IE isn't working as it should there. You might be best posting on a IE specific forum or perhaps StackOverflow.

    Allan
This discussion has been closed.