Cakephp Sqlserver编码

This has me stumped. I am trying to set encoding for my Sqlserver connection and all that I have tried has failed. I only get

Error: A Database connection using "Sqlserver" was missing or unable to connect.
The database server returned this error: SQLSTATE[IMSSP]: An invalid encoding was specified for SQLSRV_ATTR_ENCODING.

The original error I was trying to solve through encoding is:

Error: SQLSTATE[IMSSP]: An error occurred translating the query string to UTF-16: No mapping for the Unicode character exists in the target multi-byte code page.

The SQL version is 2008 R2
Cakephp Version: 2.4.2
PHP Version: 5.3.27

SQL 2008 doesn't support UTF-16 only SQL 2012

http://msdn.microsoft.com/en-us/library/ms143726(v=sql.110).aspx

UTF-8 isn't supported at all by MS SQL.

After a lot of trial and error this works:

public $default = array(
    'datasource'    => 'Database/Sqlserver',
    'persistent'    => false,
    'host'      => 'localhost',
    'login'     => 'sa',
    'password'  => 'password',
    'database'  => 'SchedulingDatabase',
    'encoding'  => PDO::SQLSRV_ENCODING_UTF8
);

Tried this out with Cakephp 3.0 seems to work nicely.

'Datasources' => [
    'default' => [
        'className' => 'Cake\Database\Connection',
        'driver' => 'Cake\Database\Driver\Sqlserver',
        'persistent' => false,
        'host' => 'localhost',
        'port' => '1433', //using this port
        'username' => 'sa',
        'password' => 'password',
        'database' => 'cake_bookmarks',
        'encoding' => PDO::SQLSRV_ENCODING_UTF8,
        'timezone' => 'UTC',
        'cacheMetadata' => true,
        'quoteIdentifiers' => false,
    ]