Arrest-MySQL icon indicating copy to clipboard operation
Arrest-MySQL copied to clipboard

Values with "é" or "è" cause responses to show NULL

Open michaelyork opened this issue 12 years ago • 1 comments

michaelyork avatar May 05 '13 05:05 michaelyork

This is a wide known issue; You must encode characters to utf8 before passing them to json_encode. Add this piece of code

// map to utf8 to avoid broken json
$result = array_map('utf8_encode', $result);

right after (below)

if($result = $this->db->fetch_array()){

in lib/arrest-mysql.php file.

ludesign avatar Jul 13 '13 08:07 ludesign