I have an autocomplete that connects via ajax, but when I typed accented letters that are even in the database, the query did not return anything. Both the bank php.ini
and the settings of the codeigniter ( database.php
, config.php
) are set to utf-8, the files are saved with UTF-8 as well.
Autocompletes:
I tried to test it by accessing the direct url, for the method of getLocalidadesByUf
of controller
Base.php
, and print the parameter to see how it was arriving, typed bed , but when page is submitted the value arrives as *cama%C3%A7*
class Base extends CI_Controller
{
public function getLocalidadesByUf($uf, $nome) {
echo json_encode($this->uf_model->getLocalidadesByUf($uf, $nome), JSON_UNESCAPED_UNICODE);
}
}
I'm pretty lost and I do not know what to do, would I have a tip?