I'm using AJAX in my site and Latin 1 characters which is indeed a problem. The solution I found was to convert accented character in html entities but i don't know how.
I'd like to transform ó, for example, in ó
I tried to use htmlentities("ó") but it printed ó
. I don't know what to do anymore
Better explaining
I'm using ZF and JQuery. My site uses a form to record some data. To insert this data I use
$data = array(
'reg_creditorid' => $this->_request->getParam('creditor'),
'reg_debtorid' => $this->_request->getParam('debtor'),
'reg_reason' => htmlentities($this->_request->getParam('reason')),
'reg_value' => str_replace(',', '.', $this->_request->getParam('value')),
'reg_date' => date('Y-m-d')
);
$this->registries->insert($data);
When I tried to type ó in the text input I noticed that when I used getParam, it got ó
instead of ó
I created a test project, with nothing (no ZF, no jQuery, no MVC, nothing). I coded echo htmlentities('ó');
and it printed ó
. What could it be, then?