Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Specify charset for dblib dsn #4

Merged
merged 2 commits into from
Nov 13, 2013
Merged

Specify charset for dblib dsn #4

merged 2 commits into from
Nov 13, 2013

Conversation

coverslide
Copy link
Contributor

This fixes some encoding issues when using the dblib driver. It seems to want to use ISO-8859-1 by default. Specifying charset to UTF-8 in my config fixes these issues with this patch added. I also noticed issue #3, but I haven't seen any problems on my end, so perhaps it's something fixed with Doctrine, or the French_AS_CI charset is not a supported charset.

This fixes some encoding issues when using the dblib driver
@@ -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'] . ';';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be $dsn I suspect

@coverslide
Copy link
Contributor Author

Ugh, my bad. That's what I get for typing in github's editor instead of upping from a real repo.

markcollister added a commit that referenced this pull request Nov 13, 2013
@markcollister markcollister merged commit 5636ca2 into realestateconz:master Nov 13, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants