Permalink
Browse files

Merge pull request #249 from voidus/encodingFixes

Try to use UTF-8 everywhere
  • Loading branch information...
exi committed May 19, 2012
2 parents cf582cb + a4c24b4 commit f9bcf3bce1242ebeb5ab2f34c4bad5bb5de8f3d0
@@ -73,6 +73,8 @@ database.params.password = "phprojekt_password"
; Name of the database, inside the server
database.params.dbname = "phprojekt"
+database.params.charset = "utf8"
+
;;;;;;;
; LOG ;
;;;;;;;
@@ -275,6 +275,8 @@ private function _getDatabase($username = '', $password = '', $dbname = '', $ada
$content .= '; Name of the database, inside the server' . $this->_eol;
$content .= 'database.params.dbname = "' . addcslashes($dbname, '"') . '"' . $this->_eol;
$content .= 'database.params.port = ' . (int) $port . $this->_eol;
+ $content .= $this->_eol;
+ $content .= 'database.params.charset = "utf8"' . $this->_eol;
return $content;
}
@@ -346,7 +346,7 @@ public function migrateCalendar()
`visibility` int(1) DEFAULT '0',
`participant_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
-)
+) DEFAULT CHARSET utf8
HERE
);
Phprojekt::getInstance()->getDb()->insert(
@@ -146,7 +146,7 @@ public function createTable($tableName, $fields, $keys = array())
} else {
$sqlString = substr($sqlString, 0, -2);
}
- $sqlString .= ")";
+ $sqlString .= ") DEFAULT CHARSET=utf8";
try {
$this->_db->getConnection()->exec($sqlString);

0 comments on commit f9bcf3b

Please sign in to comment.