mysql_character_set_name

(PHP 4 CVS only)

mysql_character_set_name -- Returns the name of the character set

Description

int mysql_character_set_name ( [resource link_identifier])

mysql_character_set_name() returns the default character set name for the current connection.

Example 1. mysql_character_set_name() example

<?php
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
$charset = mysql_character_set_name($link);
printf ("current character set is %s\n", $charset);
?>

The above example would produce the following output:
latin1

See also: mysql_real_escape_string()