I found a problem in the Dhtmlx Combo. Filtering with some latin-2 chars, for example: “íéáűúőöüó”, the autocomplete feature seems to fail. Sometime the options are visible for a moment, but they disappear, and there is no way to choose from the list, and also filtering for the next chars doesn’t work. So it seems, that the xml is interpreted, because of that short time, when the list is visible, but after a latin-2 char, the filtering stops working.
I’m use the 2.6 version.
My mistake. Our PHP framework modified, and the xml source getting latin-2 charset. Now it’s fixed to UTF-8, and combo works well. Sorry for taking Your time!
Sorry, but I was wrong. Still not work. I’m attached the xml. This is a result for a ‘So%’ mask, in a Accent Insensitive field. No mather how it works, from chache or from the xml, it’s making strange results.
We have not reproduced the problem locally. Please have a look at the attached sample and try to use libraries from this demo in your application demo.zip (22.7 KB)
Please try with: ‘Só’ and then type ‘d’ in your demo. When you filter to ‘Sód’, You wont get ‘Sódár…’, but all options reset to the state of filter for simple ‘S’. Thats the problem.
My solution on this problem (being a user of swedish language) was to convert everything to UTF-8 encoding:
First make sure your database contents are encoded in UTF-8
Make sure you output your XML data in UTF-8
<?xml version="1.0" encoding="utf-8"?>
You might also have to override the encoding of your database output with UTF-8.
For me using PHP that means using the function utf8_encode():
<?php
// Decode the input searchstring that comes from the XML call by dhtmlXCombo
$searchstring = utf8_decode($_GET['mask']);
// Query the database
$query = "SELECT * FROM .... WHERE surname LIKE '" . $searchstring . "%'......";
$sql_get_contact = mysql_query($query);
// Create new XML document with ver 1.0 and also with encoding UTF-8
$xmldoc = new DomDocument('1.0', 'utf-8');
// Print out your results in to the XML DOM
while ($contact = mysql_fetch_assoc($sql_get_contact)) {
// Override encoding of your output with UTF-8
$contact = array_map('utf8_encode', $contact);
// Do your XML DOM stuff here...
}
// Parse your XML document
echo $xmldoc->saveXML();
?>
I hope this helps someone. Took me over 2 hours to get everything up!
Thanks! But this causes the problem. It’s an Hungarian_CI (MSSQL) table, and it’s an latin-2 project. I have this situlation, can’t modify DB parameters. But converting strings solved the problem.
Greets,
–
S
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan