Editor 1.7.3 : error message if json_encode fails
Editor 1.7.3 : error message if json_encode fails
madmike
Posts: 30Questions: 4Answers: 0
in Bug reports
HI, using Editor 1.7.3, I'm receive an error message :
{"error":"JSON encoding error: Malformed UTF-8 characters, possibly incorrectly encoded"}.
- How I can have mode information to debug. ?
- Is it possible to add something to force utf encoding if not ?
Thanks for help.
Mike
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Hi @madmike ,
Has the database been set to support UTF-8?
Cheers,
Colin
Yes it is.
I temporary solve using a query in the database : https://stackoverflow.com/questions/1476356/detecting-utf8-broken-characters-in-mysql
But there is a way to avoid that in Editor, or add a treatment in the PHP json answer ? And where do that ?
Thanks
Try calling:
Just before you create the Editor PHP instance.
Allan
@allan thanks a lot
HI , you write to set $db->sql( 'set names utf8' ); but I have no idea in what file I have to write this. my main file is ritbeheer that calls ritten.php just like in the trial package is called staff.php.
my structure is ;
I have been searching for days now but have no clue.
Put it just before your
Editor:inst( $db .... )
call.Allan