<?php// Assume $conn is a connection to a ISO-8859-1 database$encoding = pg_client_encoding($conn); echo "Client encoding is: ", $encoding, "\n";?>
The above example will output:
Client encoding is: ISO-8859-1