Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   PHP (https://www.askmehelpdesk.com/forumdisplay.php?f=454)
-   -   An error occurred! SyntaxError: JSON.parse: unexpected character (https://www.askmehelpdesk.com/showthread.php?t=728752)

  • Jan 18, 2013, 05:16 AM
    squibthat
    An error occurred! SyntaxError: JSON.parse: unexpected character
    I get this error "An error occurred! SyntaxError: JSON.parse: unexpected character" on close examination using firebug on the XHR tab I realize that my response as these strange characters � ( black diamond shaped mark with a white question mark at the center) that is preventing me from using the json data I retrieved from mysql usiing PHP json_encode and passed back using jquery's ajax method, your assistance will be highly appreciated
  • Jan 21, 2013, 08:18 AM
    squibthat
    I finally located and solved the problem; one of my php files had a bad non UTF8 encoded character perhaps because I had copy pasted it from another application (WORD I think) in my netbeans it was given as a warning "Saw U+0000 on stream.." I really hope this answer helps some other person this error as given me sleepless nights.
    My solution was to carefully copy the code to a new file avoiding the illegal character

  • All times are GMT -7. The time now is 03:16 PM.