array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'it', ), 'this' => array ( 0 => 'function.mysql-client-encoding.php', 1 => 'mysql_client_encoding', 2 => 'Returns the name of the character set', ), 'up' => array ( 0 => 'ref.mysql.php', 1 => 'MySQL Funzioni', ), 'prev' => array ( 0 => 'function.mysql-affected-rows.php', 1 => 'mysql_affected_rows', ), 'next' => array ( 0 => 'function.mysql-close.php', 1 => 'mysql_close', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/mysql/functions/mysql-client-encoding.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
(PHP 4 >= 4.3.0, PHP 5)
mysql_client_encoding — Returns the name of the character set
Questa enstensione deprecata da PHP 5.5.0, e sarà rimossa in futuro. Al suo posto, usare l'estensione MySQLi o PDO_MySQL. Vedere anche la guida MySQL: scelta dell'API e le FAQ relative per ulteriori informazioni. Le alternative a questa funzione includono:
Retrieves the character_set
variable from MySQL.
link_identifier
La connessione MySQL. Se
l'identificativo di connessione non è specificato, l'ultima connessione aperta da
mysql_connect() viene assunta. Se questa connessione non è trovata, si
cercherà di crearne una come se mysql_connect() fosse stata chiamata
senza argomenti. Se una connessione non è trovata oppure non viene stabilita, un
avviso di livello E_WARNING
viene generato.
Returns the default character set name for the current connection.
Example #1 mysql_client_encoding() example
<?php
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
$charset = mysql_client_encoding($link);
echo "The current character set is: $charset\n";
?>
Il precedente esempio visualizzerà qualcosa simile a:
The current character set is: latin1