How can I set the character set with PHP connector?

Hi,

I use the following code for MySQL DB, how can I set the character set for utf8 with PHP connector ?

require(“…/…/codebase/db_mysqli.php”);
$conn = new mysqli($mysql_server, $mysql_user, $mysql_pass, $mysql_db);

require(“…/…/codebase/data_connector.php”);
$dbtype = “MySQLi”;
$data = new JSONDataConnector($conn, $dbtype);

Please support.
Thanks,
Willy Lin

Hello.

You may set the encoding type for your connector data using the set_encoding method:
https://docs.dhtmlx.com/connector__php__connector_object_methods.html#setencoding
Please, note that the utf-8 is already a default encoding type used by dhtmlxConnector