I have in my page the code:
<meta http-equiv="Content-Language" content="ar-lb">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<?php
$db = new PDO("odbc:DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=".realpath($dbName).";charset=utf-8");
?>
And when I execute a normal SELECT query I get ???? for Arabic characters. I have been through many questions and posts but I rarely found my case and none of them helped. I tried COM but I got some error saying the class didn't exist, and I couldn't find it in my php.ini
I need to get the data from the .mdb tables to my MySQL database...
Edit: I was able to solve my problem //////////////////////// This is the code I used:
<meta http-equiv="Content-Language" content="ar-lb">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<?php
$db_path = "example.mdb";
$db_path = realpath($db_path);
$db_dir = dirname($db_path);
$constr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=".$db_path.";DefaultDir=".$db_dir.";";
$link = new COM("ADODB.Connection", NULL, CP_UTF8);
$link->Open($constr);
?>
At first COM didn't help at all, but what did the trick was the adding those 2 arguments to the COM constructor...