Home » Database » MDB2_Driver_pgsql » Bug #6814
Changing encoding
Details
| Request #6814 | Changing encoding |
|---|---|
| Submitted | 2006-02-17 15:10 UTC |
| From | radzaw at php dot net |
| Status | Duplicate |
| Package | MDB2_Driver_pgsql |
| PHP Version | Irrelevant |
| OS | Any |
| 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.