Datatable doesn't display Russian symbols

I have a mysql table with cp1251 codepage. When I use just php+html to display the content of the table all russian text displays normally. But when in the same page I use webix datatable it displays only latin symbols, lines with russian text are just empty.
I also tried to change the table’s codepage to utf8, in this case datatable works normally. But anyway, is there a way to keep cp1251 codepage and display russian symbols?

not sure, but try to set this response header
Content-Type: application/json; charset=cp1251

yes, it’s already set to that.
The problem is that I have to use datatable’s render_sql function with SQL statements with regular expressions.
When I use table with cp1251 charset sql with regular expressions works well and returns filtered records but the datatable can’t display that records.
And when I use table with utf8 charset then datatable displays russian symbols but regular expressions don’t work ans sql returns 0 records.
That’s why I have to use cp1251.
The funny thing is that the same page with the same sql statement works well using PHP mysql_query() function but datatable with its render_sql() function shows empty lines.

I think you need to check your php file encoding. set it to utf8 and use utf8 in db as well.

Thank you! It worked after I changed php file encoding. I didn’t think this could help though.