Special characters and the return of null in JSON string
Special characters and the return of null in JSON string
Hi
Just to share ......
I just had a problem with empty cells in the data-table. The reason was Norwegian characters in the data (I guess the same goes for any special character) which came from a MySQL database, using the server_processing.php script in the server_side folder (which is in the examples folder). This may have been solved before, but I couldn't find any answer.
What made the problem go away was using the utf8_encoding PHP function on line 167 in the aforementioned file so that it reads:
$row[] = utf8_encode($aRow[ $aColumns[$i] ]);
instead of
$row[] = $aRow[ $aColumns[$i] ];
This works, but may not be the correct way to approach this problem and I would like to hear if anybody have better solutions
Yours
Omkara
Just to share ......
I just had a problem with empty cells in the data-table. The reason was Norwegian characters in the data (I guess the same goes for any special character) which came from a MySQL database, using the server_processing.php script in the server_side folder (which is in the examples folder). This may have been solved before, but I couldn't find any answer.
What made the problem go away was using the utf8_encoding PHP function on line 167 in the aforementioned file so that it reads:
$row[] = utf8_encode($aRow[ $aColumns[$i] ]);
instead of
$row[] = $aRow[ $aColumns[$i] ];
This works, but may not be the correct way to approach this problem and I would like to hear if anybody have better solutions
Yours
Omkara
This discussion has been closed.