Hello friends I know that this question is very common but I do not quite understand what is happening, I am trying to convert an array that contains special characters to JSON.
1.- This is the array that is returned to me from a database I am connecting to an ODBC (SQL 2000) with PDO try to set utf8 but it does not work:
Array
(
[0] => Array ( [idOperadores] => 256 [operador] => JORGE CRUZ CEDE�O)
[1] => Array ( [idOperadores] => 628 [operador] => BERNABE CUEVAS BRISE�O)
)
$pdo = new PDO('odbc:odbcname', 'user', 'passwor');
$pdo->query('SET NAMES utf8');
2.- I convert the array to JSON but it did not work either:
$result = json_encode($array,JSON_UNESCAPED_UNICODE);
Am I doing something wrong? I hope you can help me thanks.
Note: I have found some references but I would have to go through the array to set utf8_encode