Title: Combobox and special chars Post by: rannacher on July 23, 2015, 01:13:32 AM Gents, Ladies,
pls help - very strange phenomen... I am using datagrid with combobox, serverside php for data retrieval from mysql DB. Now the DB has and stores correctly special chars like the German the öäüß etc. Data retrieval via php script to the combobox also works fine, but in order to that the values with special chars are getting displayed in the combobox I have to mask the rows/fields fetched serverside for which I use below function umlaute() DATA FETCHING while($row = mysqli_fetch_assoc($result)) { $row['projectid']= $row['ID']; $row['projectname']= umlaute($row['NAME']); $row_set[] = $row; } echo json_encode($row_set); MASKING function umlaute($text) { $returnvalue=""; for($i=0;$i<strlen($text);$i++){ $teil=hexdec(rawurlencode(substr($text, $i, 1))); if($teil<32||$teil>1114111){ $returnvalue.=substr($text, $i, 1); }else{ $returnvalue.="&#".$teil.";"; } } return $returnvalue; } SO, NOW THE PROBLEM: With this I see all the values (projectname) and they are correctly displayed in the combobox selection when it is opened. f.e. in the list I see "Diverse Geschäftsfälle" which is as it should be. BUT and there are 2 BUTs --> when I select the value from the open combobox then the selcted value becomes "15002-Diverse Geschäftsfälle" which is displayed after ot is closed. --> and when datagrid opens after datagrid populate/select and this value is stored in DB then nothing at all is displayed PLEASE HELP and THX in ADVANCE! Title: Re: Combobox and special chars Post by: rannacher on July 27, 2015, 02:34:07 AM ANY HELP??? Pleazzzze!
|