Turkish Character Problem (DataTables 1.10.16)

Turkish Character Problem (DataTables 1.10.16)

JohnValdeJohnValde Posts: 4Questions: 1Answers: 0

Hello,

There is a problem about Turkish Character in dataTables. You can find my dataTable Jquery code in main page below:

       $('#bayiTablosu').dataTable({
          paging: false,
          retrieve: true,
          data: bayiTabloDetayi,
          dom: 'Bfrtip',
          buttons: [
                  'copy', 'excel', 'pdf', 'print'
                    ],
          "language": dilDosyasi,
          columns: sutunlar
            
            });

            $('#bayiTablosu').dataTable().fnClearTable();
            var bayiTabloDetayi2 = bayiDatabase[paths[id].name];
            
            $('#bayiTablosu').dataTable().fnAddData(bayiTabloDetayi2);
            $('.buttons-copy, .buttons-csv, .buttons-print, .buttons-pdf, .buttons-excel').addClass('btn btn-info mr-1');

There are a lot of Turkish characters (ğ,Ğ,ü,Ü,Ş,ş,I,ı,ç,Ç) in my Javascript object that is using as a Database. (bayiTabloDetayi is my database variable)

They seems different on web pages as a result:

For example; Ramazan Çakmak seems Ramazan �akmak.

How can i fix it ?

Version: (DataTables 1.10.16)

Thanks,

Regards,

J.V.

Replies

  • colincolin Posts: 15,236Questions: 1Answers: 2,598

    Hi @JohnValde ,

    This thread here might help, you need to ensure the database is using UTF8.

    Cheers,

    Colin

This discussion has been closed.