(PHP 5 >= 5.2.3)
mysql_set_charset — Sets the client character set
Questa estensione è stata deprecata in PHP 5.5.0 ed è stata rimossa in PHP 7.0.0. Al suo posto, si dovrebbe usare l'estensione MySQLi o PDO_MySQL. Vedere anche la guida MySQL: scelta dell'API. Le alternative a questa funzione includono:
charset to the connection string, such as charset=utf8Sets the default character set for the current connection.
charsetA valid character set name.
link_identifierLa connessione MySQL. Se
l'identificativo di connessione non è specificato, viene usata l'ultima connessione aperta da
mysql_connect(). Se tale connessione non viene trovata, si
cercherà di crearne una come se mysql_connect() fosse stata chiamata
senza argomenti. Se nessuna connessione viene trovata o stabilita, viene generato un
errore di livello E_WARNING.
Nota:
This function requires MySQL 5.0.7 or later.
Nota:
This is the preferred way to change the charset. Using mysql_query() to set it (such as
SET NAMES utf8) is not recommended. See the MySQL character set concepts section for more information.