Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
If you installed v 4.7.x.3.9 or 5.x.1.10, you may need to run update.php.
This bug does not affect pgSQL. See system.install:
function system_update_169() {
// Warn PGSQL admins if their database is set up incorrectly
if ($GLOBALS['db_type'] == 'pgsql') {
$encoding = db_result(db_query('SHOW server_encoding'));
if (!in_array(strtolower($encoding), array('unicode', 'utf8'))) {
$msg = 'Your PostgreSQL database is set up with the wrong character encoding ('. $encoding .'). It is possible it will not work as expected. It is advised to recreate it with UTF-8/Unicode encoding. More information can be found in the <a href="http://www.postgresql.org/docs/7.4/interactive/multibyte.html">PostgreSQL documentation</a>.';
watchdog('php', $msg, WATCHDOG_WARNING);
drupal_set_message($msg, 'status');
}
}
Comments
Comment #1
agentrickardIs that what the following comment line in the install file does?
I had that in previous versions but took it out.
And how does pgSQL handle it?
Pointers to samples are acceptable; as are patches.
Comment #2
dsp1 commentedyes, that is what that does.
not sure how pgSQL handles it, but many modules have this. so it should be ok.
Comment #3
agentrickardYea, I see it in system.install.
I removed it, incorrectly, when I was cleaning up the code for the install file to add pgsql support.
I'll put in back shortly. Will be at OSCMS rest of week.
Comment #4
agentrickardFixed in HEAD, 5.x.1-dev, and 4.7.x.3-dev.
If you installed v 4.7.x.3.9 or 5.x.1.10, you may need to run update.php.
This bug does not affect pgSQL. See system.install:
Comment #5
agentrickardThis may need follow-up, as I used the following update syntax, which may be overkill.
Reading http://drupal.org/node/22218#utf8_sql and http://api.drupal.org/api/5/function/update_convert_table_utf8 suggests that this is incorrect.
I will recommit the update function as:
Comment #6
agentrickard