ID: 40371 Updated by: [EMAIL PROTECTED] Reported By: jamaicafisk at gmail dot com -Status: Open +Status: Assigned Bug Type: PostgreSQL related Operating System: Windows XP SP2 PHP Version: 6CVS-2007-02-06 (snap) -Assigned To: +Assigned To: edink New Comment:
This means PgSQL client has been built without multibyte support. Edin, is this possible to change somehow? Previous Comments: ------------------------------------------------------------------------ [2007-02-06 13:15:42] jamaicafisk at gmail dot com 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 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40371&edit=1