(PHP 4 >= 4.3.0, PHP 5)
mysql_client_encoding — Retorna o nome do conjunto de caracteres
$link_identifier
] )Obtém a variável character_set do MySQL.
link_identifier
The MySQL connection. If the
link identifier is not specified, the last link opened by
mysql_connect() is assumed. If no such link is found, it
will try to create one as if mysql_connect() was called
with no arguments. If no connection is found or established, an
E_WARNING
level error is generated.
Retorna o conjunto de caracteres padrão da conexão atual.
Exemplo #1 Exemplo mysql_client_encoding()
<?php
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
$charset = mysql_client_encoding($link);
echo "O conjunto de caracteres atual é: $charset\n";
?>
O exemplo acima irá imprimir algo similar à:
O conjunto de caracteres atual é: latin1