Coding with SPIP 2.1
SPIP 2.1 Technical Documentation

> > > > sql_set_charset

sql_set_charset

The sql_set_charset() function requests the usage of the specified encoding for transactions between PHP and the database manager.

sql_set_charset() accepts three parameters. Only the first is required:

  1. $charset is the requested charset, such as "utf8"
  2. $serveur,
  3. $options.

This function is called immediately after each connection to the database server in order to specify the charset to be employed. This encoding selection is defined elsewhere in the charset_sql_connexion meta variable created during the installation of SPIP.

  • Author :
  • Published :
  • Updated : 17/05/10
  • Translations : English, français