"non well-formed" with accented characters using OptionsConn

I have to load combobox from DB.

I have this code:

............. scheduler.config.lightbox.sections=[ {name: "Desc", height:30, map_to:"text", type:"textarea" , focus:true}, {name: "Time", height:30, type:"calendar_time", map_to:"auto"}, {name: "Cliente", height: 30, map_to: "cliente", type: "select", options: scheduler.serverList("cliente")} ]; ............ scheduler.init('scheduler_here', new Date(), "week"); scheduler.setLoadMode("week"); scheduler.load("./pages/agenda/load_agenda.php"); var dp = new dataProcessor("./pages/agenda/load_agenda.php"); dp.init(scheduler);

Into load_agenda.php:

$list_clienti = new OptionsConnector($res, "MySQLi"); $list_clienti->render_table("clienti","id","id(value),denominazione(label)"); $calendar = new schedulerConnector($res, "MySQLi");//connector initialization $calendar->set_options("cliente", $list_clienti);

I have an alert with XML:

<?xml version='1.0' encoding='utf-8' ?><data><coll_options for='cliente'><item value='1' label='XXX Societ� cooperativa sociale'></item> <item value='2' label='NAZZARI SRL'></item>

Into DB, into field “denominazione” there’s
“XXX Società cooperativa sociale”.

How can I fix it?

Thanks

This one is probably because of your MySQL settings.
You could try to add something like following to my.ini

character-set-server=utf8
collation-server=utf8_general_ci

See article: dev.mysql.com/doc/refman/5.7/en … tions.html

Or you could try to set charset for your connection.
Something like following:

$conn = new mysqli('localhost', 'root', 'root', 'scheduler');
$conn->set_charset("utf8");
/*...*/

Thanks!
Solved using

$conn = new mysqli('localhost', 'root', 'root', 'scheduler'); $conn->set_charset("utf8");