mysql_client_encoding
PHP function
Edit on GitHub ✎
(PHP 4 >= 4.3.0, PHP 5)
Returns the name of the character set
Note mysqli_character_set_name
Description
mysql_client_encoding(resource $link_identifier = NULL): string
Retrieves the character_set variable from MySQL.
Parameters
Return Values
Returns the default character set name for the current connection.
Examples
mysql_client_encoding() example
php
<?php
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
$charset = mysql_client_encoding($link);
echo "The current character set is: $charset\n";
?>The above example will output something similar to:
output
The current character set is: latin1