int mysql_set_character_set(MYSQL *mysql, const char *csname);
Le résultat est différent de 0 en cas de succès.
#include <mysql.h>
static MYSQL *hConnexion;
static unsigned int Delai;
...
Delai=30;
if (mysql_options(hConnexion, MYSQL_OPT_CONNECT_TIMEOUT, (char *)&Delai))
{
...
}
...
if (mysql_autocommit(hConnexion, 0))
{
...
}
...
if (mysql_set_character_set(hConnexion, "utf8"))
{
...
}
...