mysql_client_encoding()

It  returns the name of the character set for the current connection

Example

<?php
$conn    = mysql_connect(‘localhost’, ‘root’, ‘password’);
echo  mysql_client_encoding($conn);
?>