utf8 encoding with https does not display Latin characters correctly

0

I'm using laravel with oracle I already have my page published on https. When I bring data with ajax it shows me the wrong characters.

Then I have to use php utf8_encode () to fetch them and print. Then when wanting to print the answer, the characters with bad accents appear.

$result = array();
    foreach ($datos as $key => $dato) {

        array_push($result, 
            array(
                'localidad' => utf8_encode($dato->localidad),
                'descripcion' => utf8_encode($dato->descripcion),
                'oficina' => utf8_encode($dato->oficina),
                'cod_departamento' => utf8_encode($dato->cod_departamento)
            )
        );

}
return response()->json($result);
    
asked by Leoh 28.11.2017 в 19:08
source

0 answers