Quantcast
Channel: Free community support — DataTables forums
Viewing all articles
Browse latest Browse all 35431

Problem with special characters when saving state to DB

$
0
0

Hi,

I have a datatables object which contains special characters like "æøå".. The filter on these works on first display of my table. But I also use a function to save the filter as a jason object in the database and when I do that the saved value of æøå gets to be "æøå" in the database.

I do the save so the user doesnt have to do the same filter when he/she returns to the datatable after having browsed other parts of the application.

Any help here would be appreciated.

CODE:

             "stateSaveCallback": function (settings, data) {
                // Send an Ajax request to the server with the state object
                $.ajax( {
                  "url": "egu_eg01.save_table",
                  "data":  { p_data: JSON.stringify(data) },
                  "dataType": "json",
                  "type": "POST",
                  "success": function () {}
                } );


              "stateLoadCallback": function (settings) {
                var o;

                // Send an Ajax request to the server to get the data. Note that
                // this is a synchronous request since the data is expected back from the
                // function
                $.ajax( {
                  "url": "egu_eg01.load_table",
                  "async": false,
                  "dataType": "json",
                  "success": function (json) {

                        o = json;


                   }
                } );

                return o;
              }



Viewing all articles
Browse latest Browse all 35431

Trending Articles