EasyUI Forum
June 24, 2024, 11:42:32 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Combobox and special chars  (Read 4381 times)
rannacher
Jr. Member
**
Posts: 52


View Profile
« 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&#32;Gesch&#228;ftsf&#228;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!

Logged
rannacher
Jr. Member
**
Posts: 52


View Profile
« Reply #1 on: July 27, 2015, 02:34:07 AM »

ANY HELP??? Pleazzzze!
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!