Hi from Spain,
We have a problem with the special characters in our grid.
I'm going to try explain it.
If I create a new record in our grid, and we write some character like for example "España" or "30 €" or "Informática"
This special characters are stored in our Database like "España", "30 €", "Informáica"
We would like that this data, store in the database like the first example.
I have seen a similar issue (https://phpgrid.desk.com/customer/portal/questions/5700458-trouble-reading-portuguese-characters-from-mysql) but I don't know what is its resolution.
Sorry for my english
Emailed you a working code, and steps to changes. I've tested and verified it's working.
step1: add events in grid config, where $g = new jqgrid();
$e = array();
$e["on_update"] = array("update_client", null, true);
$e["on_data_display"] = array("filter_display", null, true);
foreach($data["params"] as $k=>$d)
$data["params"][$k] = htmlentities($data["params"][$k],ENT_QUOTES,'utf-8');
foreach($data["params"] as &$d)
foreach($d as $k=>$v)
$d[$k] = html_entity_decode($d[$k]);
step2: Edit jqgrid_dist.php and comment out following lines.
$op = $_POST['oper'];
$data = $_POST;
$pk_field = $this->options["colModel"]["index"];
// fix for dialog edit v/s inline edit
$id = (isset($data[$pk_field])?$data[$pk_field]:$data["id"]);
// formatters array for k->v
$is_numeric = array();
Sample test code which i made here is attached.
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?