(PHP 5 >= 5.2.3)
mysql_set_charset — Sets the client character set
Questa enstensione deprecata da PHP 5.5.0, e sarà rimossa in futuro. Al suo posto, usare l'estensione MySQLi o PDO_MySQL. Vedere anche la guida MySQL: scelta dell'API e le FAQ relative per ulteriori informazioni. Le alternative a questa funzione includono:
charset
to the connection string, such as charset=utf8
Sets the default character set for the current connection.
charset
A valid character set name.
link_identifier
La connessione MySQL. Se
l'identificativo di connessione non è specificato, l'ultima connessione aperta da
mysql_connect() viene assunta. Se questa connessione non è trovata, si
cercherà di crearne una come se mysql_connect() fosse stata chiamata
senza argomenti. Se una connessione non è trovata oppure non viene stabilita, un
avviso di livello E_WARNING
viene generato.
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.