array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'it', ), 'this' => array ( 0 => 'function.bind-textdomain-codeset.php', 1 => 'bind_textdomain_codeset', 2 => 'Specify or get the character encoding in which the messages from the DOMAIN message catalog will be returned', ), 'up' => array ( 0 => 'ref.gettext.php', 1 => 'Gettext Funzioni', ), 'prev' => array ( 0 => 'function.-.php', 1 => '_', ), 'next' => array ( 0 => 'function.bindtextdomain.php', 1 => 'bindtextdomain', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/gettext/functions/bind-textdomain-codeset.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

bind_textdomain_codeset

(PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8)

bind_textdomain_codesetSpecify or get the character encoding in which the messages from the DOMAIN message catalog will be returned

Descrizione

bind_textdomain_codeset(string $domain, ?string $codeset = null): string|false

bind_textdomain_codeset() allows to set or get the encoding in which messages from domain will be returned by gettext() and similar functions.

Elenco dei parametri

domain

The domain.

codeset

The code set. If null, the currently set encoding is returned.

Valori restituiti

A string on success.

Errori/Eccezioni

Throws a ValueError if domain is the empty string.

Log delle modifiche

Versione Descrizione
8.4.0 Now throws a ValueError if domain is the empty string.
8.4.0 codeset is optional now. Previously, the parameter always had to be specified.
8.0.3 codeset is nullable now. Previously, it was not possible to retrieve the currently set encoding.

Note

Nota:

The bind_textdomain_codeset() information is maintained per process, not per thread.