pg_client_encoding
pg_client_encoding
Gets the client encoding
string **pg_client_encoding** $connection
PostgreSQL supports automatic character set conversion between
server and client for certain character sets.
returns the client
encoding as a string. The returned string will be one of the
standard PostgreSQL encoding identifiers.
pg_client_encoding
Opmerking: > If libpq is compiled without multibyte encoding support, always returns . Supported encoding depends on PostgreSQL version. Refer to the PostgreSQL Documentation supported encodings.
pg_client_encoding``SQL_ASCIIThe function used to be called .
pg_clientencoding
connection
The client encoding.
Voorbeeld: example
<?php
// Assume $conn is a connection to a ISO-8859-1 database
$encoding = pg_client_encoding($conn);
echo "Client encoding is: ", $encoding, "\n";
?>
Client encoding is: ISO-8859-1
pg_set_client_encoding