printing UTF8 data in DT wih server side, solved

printing UTF8 data in DT wih server side, solved

jinjungjinjung Posts: 24Questions: 0Answers: 0
edited April 2012 in General
Because I have not found a result of my problem in DT forums, I share a working solution !
I have tried many many tests (cannot change db and web server config ) for printing utf8 in datatables, but without success.
Here something working for me:

[code]
$(document).ready(function() {
jQuery.ajaxSetup ( {
'beforeSend' : function(xhr) {
xhr.overrideMimeType('text/html; charset=UTF-8');
}
});
});
[/code]

Junjung

Replies

  • allanallan Posts: 63,810Questions: 1Answers: 10,516 Site admin
    It you set charset="utf-8" as an attribute for your SCRIPT tag, I think this should be done automatically. However, good to hear you have a solution.

    Allan
This discussion has been closed.