Page MenuHomePhabricator

PostgreSQL access layer fails to set the client encoding
Closed, ResolvedPublic

Description

Author: marcel.gsteiger

Description:
Some PostgreSQL installations use UTF8 as default encoding for the database (as is required by MediaWiki), but the default client encoding is set to something different. MediaWiki should always enforce UTF8 after opening the database connection to avoid problems in this situation.

On recent PostgreSQL installations, this can easily be accomplished by applying the following patch to mediawiki/includes/db/DatabasePostgres.php:

187a188

$this->doQuery('SET client_encoding="UTF8"');

Version: unspecified
Severity: enhancement

Details

Reference
bz17460

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.
StatusSubtypeAssignedTask
InvalidNone
ResolvedNone

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:27 PM
bzimport set Reference to bz17460.
bzimport added a subscriber: Unknown Object (MLST).

david.bonnafous wrote:

hi,

when the default encoding for the databse is not utf8, this patch introduce a bug, isn't it ?

I update to REL1_15_0 and I comment this line for my wiki to work.

Is it possible to test something before setting "client_encoding" ?

thank you.

Jdforrester-WMF subscribed.

Migrating from the old tracking task to a tag for PostgreSQL-related tasks.