I have the following code:
$sql = "update tbl_test set category = N'resumé';
echo $sql;
$rs=odbc_exec($conn,$sql);
Where $conn is a DSN ODBC connection to an MSSQL Server. The problem seems to be that somewhere between PHP and MySQL (Maybe ODBC?) unicode characters are converted to junk. If I copy paste exactly what the echo says directly into Enterprise Manager, it inserts into MS SQL fine. If I run the code however, it always goes into MSSSQL as resumé . Any idea what I'm missing here?
The problem was not ODBC, but PHP... solution was to use utf8_decode() on the strings returned from the database.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With