Editor with WHERE shows German characters wrong (bug?)

Editor with WHERE shows German characters wrong (bug?)

KohlITKohlIT Posts: 1Questions: 1Answers: 0

I used the sample with "staff.php"
I added in the database view names with German characters. üäö etc.
If I use the basic sample this characters show in the datatable the way they should. Everything ok. Example Lötfittinge
As soon I add a WHERE statement to staff.php (lets say all who start with letter L) the output in the datatable of the special characters is wrong. L÷tfittinge . If I remove the WHERE again, it's back the way it should.
Any ideas or advice?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 56,849Questions: 1Answers: 9,035 Site admin
    Answer ✓

    Hi,

    It is most likely an character set problem between PHP and the database. Assuming you are using MySQL, add:

    $db->sql('set names utf8');
    

    immediately after the DataTables.php include. Hopefully that should do it.

    Regards,
    Allan

Sign In or Register to comment.