|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-02-06 13:23 UTC] tony2001@php.net
[2007-02-19 17:33 UTC] edink@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 21:00:01 2025 UTC |
Description: ------------ pg_set_client_encoding('UTF-8') returns 0 but a call to pg_client_encoding() afterwards returns SQL_ASCII The same code works on FreeBSD 6.2-RC1 and PHP 5.2.0 built against Postgresql 8.2 Reproduce code: --------------- <?php pg_connect('host=localhost dbname=db user=myuser password=mypass'); echo "pg_set_client_encoding: " . pg_set_client_encoding('UTF-8') . "\n"; $res = pg_query('SHOW client_encoding;'); echo "client_encoding: " . pg_fetch_object($res)->client_encoding . "\n"; echo "pg_client_encoding: " . pg_client_encoding(); ?> Expected result: ---------------- pg_set_client_encoding: 0 client_encoding: UTF-8 pg_client_encoding: UTF-8 Actual result: -------------- pg_set_client_encoding: 0 client_encoding: UTF-8 pg_client_encoding: SQL_ASCII