php man page for pg_client_encoding

Query: pg_client_encoding

OS: php

Section: 3

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

PG_CLIENT_ENCODING(3)													     PG_CLIENT_ENCODING(3)

pg_client_encoding - Gets the client encoding

SYNOPSIS
string pg_client_encoding ([resource $connection])
DESCRIPTION
PostgreSQL supports automatic character set conversion between server and client for certain character sets. pg_client_encoding(3) returns the client encoding as a string. The returned string will be one of the standard PostgreSQL encoding identifiers. Note This function requires PHP 4.0.3 or higher and PostgreSQL 7.0 or higher. If libpq is compiled without multibyte encoding support, pg_client_encoding(3) always returns SQL_ASCII. Supported encoding depends on PostgreSQL version. Refer to the PostgreSQL Documenta- tion supported encodings. The function used to be called pg_clientencoding(3).
PARAMETERS
o $connection - PostgreSQL database connection resource. When $connection is not present, the default connection is used. The default connection is the last connection made by pg_connect(3) or pg_pconnect(3).
RETURN VALUES
The client encoding, or FALSE on error.
EXAMPLES
Example #1 pg_client_encoding(3) example <?php // Assume $conn is a connection to a ISO-8859-1 database $encoding = pg_client_encoding($conn); echo "Client encoding is: ", $encoding, " "; ?> The above example will output: Client encoding is: ISO-8859-1
SEE ALSO
pg_set_client_encoding(3). PHP Documentation Group PG_CLIENT_ENCODING(3)
Related Man Pages
pg_escape_string(3) - php
pg_escape_literal(3) - php
pg_put_line(3) - php
pg_trace(3) - php
pg_tty(3) - php
Similar Topics in the Unix Linux Community
Script to connect to PostgreSQL database
S-108: PostgreSQL Security Update
bemDB 0.3.5 (Default branch)
VFront 0.94 release candidate 4 (Default branch)
How to check string encoding?