PHP 5.3 on
FreeBSD. I want to select some
utf-8 data (persian characters) from
SQL Server database, and write them to a text file, but because of
utf-8 does all the characters will be written to file ????. I have searched for two days and read most of the solutions, including:
In this question someone says that "There is no Charset parameter in DSNs for the SQL Server PDO driver" and suggests using
DBLIB driver, but here I found that that cannot using dblib.
- PHP PDO Keep Getting Error: Charset=UTF8 : An invalid keyword charset was specified in the dsn string
What should I do? Using
PDO SQL Server Driver
Also I found that in sqlsrv_connect we can set
Charset parameter to
UTF-8, but I have got this error:
Fatal error: Call to undefined function sqlsrv_connect()`.