mysql_set_charsetSets the client character set
&reftitle.description;
boolmysql_set_charsetstringcharsetresourcelink_identifierNULL
Sets the default character set for the current connection.
&reftitle.parameters;
charset
A valid character set name.
&mysql.linkid.description;
&reftitle.returnvalues;
&return.success;
&reftitle.notes;
&mysql.alternative.note;
&mysql.alternative.include;
mysqli_character_set_namePDO::setAttribute (e.g., $db->setAttribute(PDO::MYSQL_ATTR_INIT_COMMAND, "SET NAMES 'utf8'");)
This function requires MySQL 5.0.7 or later.
This is the preferred way to change the charset. Using
mysql_query to execute SET NAMES ..
is not recommended.
&reftitle.seealso;
mysql_client_encodingList of character sets that MySQL supports