Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

1.3 added "encoding" => "utf8" to default db config #176

Merged
merged 1 commit into from

3 participants

@martin-ueding

Assuming that a lot of people want to run their database with utf8 I added the option to the database.php.default. It is just a comment, so you can activate if you need it.

@ADmad ADmad merged commit 2a2a4ab into cakephp:1.3
@majna

btw. Oracle uses 'charset' config key instead of 'encoding'.

@ADmad
Collaborator

Yeah 'encoding'=>'utf8' is given since default config specifies 'driver' => 'mysql'. If you want you can submit a patch updating the comments above the class definition and specify the key to use for oracle.

@martin-ueding

That is what I thought too, but I got stuff like d?rfen (with that diamond shaped ? char) which is clearly a UTF8 interpreted as latin1 issue. So I added the line and I finally got dürfen. So the default might not work everywhere.

This is what I use:
Apache 2.2.17-1ubuntu1
libapache2-mod-php5 5.3.5-1ubuntu
php5-mysql 5.3.5-1ubuntu
MySQL Server 5.1.54-1ubuntu4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 13, 2011
  1. @martin-ueding
This page is out of date. Refresh to see the latest.
View
2  app/config/database.php.default
@@ -81,6 +81,7 @@ class DATABASE_CONFIG {
'password' => 'password',
'database' => 'database_name',
'prefix' => '',
+ //'encoding' => 'utf8',
);
var $test = array(
@@ -91,5 +92,6 @@ class DATABASE_CONFIG {
'password' => 'password',
'database' => 'test_database_name',
'prefix' => '',
+ //'encoding' => 'utf8',
);
}
View
2  cake/console/templates/skel/config/database.php.default
@@ -81,6 +81,7 @@ class DATABASE_CONFIG {
'password' => 'password',
'database' => 'database_name',
'prefix' => '',
+ //'encoding' => 'utf8',
);
var $test = array(
@@ -91,5 +92,6 @@ class DATABASE_CONFIG {
'password' => 'password',
'database' => 'test_database_name',
'prefix' => '',
+ //'encoding' => 'utf8',
);
}
Something went wrong with that request. Please try again.