2

I'm using MDB(Microsoft Access) file as database and unfortunately all Persian characters converted to question signs (?????)

I have using PDO and ODBC extension:

$conn = new PDO("odbc:DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=".$config['mdb_path']."; charset=utf8");
$conn->exec('SET NAMES utf8');
$conn->exec('SET CHARACTER SET utf8');
$conn->setAttribute(PDO::FETCH_ASSOC, true);

$sql = "SELECT * FROM `paylist`";
$exec = $conn->query($sql);
$results = $exec->fetchAll();

I have set all configs to utf8 but I don't know why still all Persian characters converted to ????

Thank you

Mohammad
  • 385
  • 1
  • 4
  • 16
  • Bit old but perhaps useful: https://stackoverflow.com/questions/28311687/unable-to-retrieve-utf-8-accented-characters-from-access-via-pdo-odbc – KIKO Software Jul 07 '18 at 07:34

0 Answers0