optikalefx / OpenJS-Grid

OpenJS Grid is the easiest jQuery Grid ever. With very little work you can have a data grid that can do everything from sorting and searching to complex database queries. Best of all, its open source. So you can learn how it's all done.
http://square-bracket.com/openjs
MIT License
96 stars 46 forks source link

Support Chinese (or non-English language) #105

Closed kimmanlui closed 6 years ago

kimmanlui commented 6 years ago

Does it support Chinese? I tried it but it did not work.

kimmanlui commented 6 years ago

I solved by myself. Here is a solution. [1] add mysql_setcharset('utf8'); [2] $data['rows']["".$key][$col] = utf8encode($cell);
is changed to $data['rows']["
".$key][$col] = $cell; [3] json_encode($this->data) is changed to echo json_encode($this->data, JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES);