From 401951b55ea849182265cb1582d32d5933874c63 Mon Sep 17 00:00:00 2001 From: Richard Hoffman Date: Mon, 11 Nov 2013 22:09:22 -0800 Subject: [PATCH 1/2] Specify charset for dblib dsn This fixes some encoding issues when using the dblib driver --- Driver/PDODblib/Driver.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Driver/PDODblib/Driver.php b/Driver/PDODblib/Driver.php index 105c456..ba2c98a 100644 --- a/Driver/PDODblib/Driver.php +++ b/Driver/PDODblib/Driver.php @@ -82,6 +82,9 @@ private function _constructPdoDsn(array $params) if (isset($params['dbname'])) { $dsn .= 'dbname=' . $params['dbname'] . ';'; } + if (isset($params['charset'])) { + $dns .= 'charset=' . $params['dbname'] . ';'; + } return $dsn; } From 53230b046f454c90b7e95f74ee1b15ffd21eb5c2 Mon Sep 17 00:00:00 2001 From: Richard Hoffman Date: Tue, 12 Nov 2013 07:23:05 -0800 Subject: [PATCH 2/2] Fix typo --- Driver/PDODblib/Driver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Driver/PDODblib/Driver.php b/Driver/PDODblib/Driver.php index ba2c98a..f52be20 100644 --- a/Driver/PDODblib/Driver.php +++ b/Driver/PDODblib/Driver.php @@ -83,7 +83,7 @@ private function _constructPdoDsn(array $params) $dsn .= 'dbname=' . $params['dbname'] . ';'; } if (isset($params['charset'])) { - $dns .= 'charset=' . $params['dbname'] . ';'; + $dsn .= 'charset=' . $params['dbname'] . ';'; } return $dsn;