I am connecting to an MS SQL server with PDO using the sqlsrv driver.
PHP version is 5.3.24. The working connection looks like this:
$dsny = \"sqlsrv
You need to apply the attribute after connecting:
$dbhy->setAttribute(PDO::SQLSRV_ATTR_ENCODING, PDO::SQLSRV_ENCODING_UTF8);
See: https://msdn.microsoft.com/en-us/library/ff628157(v=sql.105).aspx