<?php
require("../codebase/connector/grid_connector.php");//adds the connector engine
$res=mysql_connect("localhost","root","");//connects to server with db
//mysql_select_db("dhtmlx_tutorial");//connects to db with name "dhtmlx_tutorial"
mysql_select_db("mybase");
mysql_query("SET CHARACTER SET 'cp1251'",$res);
$conn = new GridConnector($res);
$conn->render_table("mytable"......);
It outputs Cyrillic names of colums correctly, but there ??? in cells. When I try to make same table via simple PHP
<?php
$db = mysql_connect("localhost", "root");
mysql_select_db("mybase",$db);
mysql_query ("SET CHARACTER SET 'cp1251'", $db);
$result=mysql_query ("SELECT ...
....
all is OK, though without mysql_query (“SET CHARACTER SET ‘cp1251’”, $db); I also got ???.
Which encoding you are using for the HTML page?
Can you save and share the XML output from the problematic script? ( please attach it as a file to preserve the encoding )
Please, try to add the following line in your php file:
mysql_query(“SET NAMES cp1251”);
$res=mysql_connect("localhost","root","");//connects to server with db
mysql_select_db("test");
mysql_query("SET NAMES cp1251");
$conn = new GridConnector($res); //initializes the connector object
$conn->set_encoding("windows-1251");
$conn->render_table("cyr","tel","name, adr, tel"); //loads data
?>