PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Database » MDB2_Driver_pgsql » Bug #6814

Changing encoding

Details

Request #6814Changing encoding
Submitted2006-02-17 15:10 UTC
Fromradzaw at php dot net
StatusDuplicate
PackageMDB2_Driver_pgsql
PHP VersionIrrelevant
OSAny
Roadmaps(Not assigned)

Comments

[2006-02-17 15:10 UTC] radzaw at php dot net

Description:
------------
It would be nice to have some method to change client encoding in PostgreSQL - for example: I have database in LATIN2 (and default client_encoding is set to LATIN2 for this connection), but I want to retrieve data in UNICODE.

Test script:
---------------
Sample code to patch pgsql.php :

function setClientEncoding($encoding)
{
@pg_set_client_encoding($this->connection, $encoding);
}

function getClientEncoding()
{
return @pg_client_encoding($this->connection);
}

Actual result:
--------------
Actually client encoding is set to default value, the same as database have.