Gents, pls need your help!
I appreciate the whole easyUI toolbox and got it functional fast and in depth with the perfect doc available online.
BUT one annoying point for me which prevents me from full happiness is the lack of clarity for SPECIAL CHARACTERS.
Please advise what to do on serverside PHP on what to do on javascript for datagrid data side for properly data masking.
(PS: in mysql the data is fine)
I have to deal with special German chars like ÄÜÖäüöß etc but the problem is also in general as I get the data
also messed up with spaces and other normal special chars. CAN I RUN ONE FUNCTION in php and JS before load
that can HANDLE ALL THE CODING and ENCODING in one central place each?
Among thousand other attemps I tried the below ones in PHP and javascript:
PHP
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;
}
JS
function mydecode(str)
{
var dummy = document.createElement('textarea');
dummy.innerHTML = str;
return dummy.value;
}
Thanks for your help.
PS: maybe an entry in the doc for this topic to clarify once and for all would be appreciated as well.