<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.gettext.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ru',
  ),
  'this' => 
  array (
    0 => 'function.bind-textdomain-codeset.php',
    1 => 'bind_textdomain_codeset',
    2 => 'Устанавливает или получает кодировку, в которой будут возвращаться сообщения из каталога сообщений домена',
  ),
  'up' => 
  array (
    0 => 'ref.gettext.php',
    1 => 'Функции gettext',
  ),
  'prev' => 
  array (
    0 => 'function.-.php',
    1 => '_',
  ),
  'next' => 
  array (
    0 => 'function.bindtextdomain.php',
    1 => 'bindtextdomain',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ru',
    '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);

?>
<div id="function.bind-textdomain-codeset" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">bind_textdomain_codeset</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.2.0, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">bind_textdomain_codeset</span> &mdash; <span class="dc-title">Устанавливает или получает кодировку, в которой будут возвращаться сообщения из каталога сообщений домена</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.bind-textdomain-codeset-description">
  <h3 class="title">Описание</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>bind_textdomain_codeset</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$domain</code></span>, <span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$codeset</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   Функция <span class="function"><strong>bind_textdomain_codeset()</strong></span> устанавливает или получает кодировку,
   в которой функции наподобие <span class="function"><a href="function.gettext.php" class="function">gettext()</a></span> будут возвращать сообщения из домена <code class="parameter">domain</code>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.bind-textdomain-codeset-parameters">
  <h3 class="title">Список параметров</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">domain</code></dt>
     <dd>
      <p class="para">
       Домен.
      </p>
     </dd>
    
    
     <dt><code class="parameter">codeset</code></dt>
     <dd>
      <p class="para">
       Кодировка.
       Функция вернёт текущую установленную кодировку, если для параметра установили значение <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.bind-textdomain-codeset-returnvalues">
  <h3 class="title">Возвращаемые значения</h3>
  <p class="para">
   Функция возвращает строку, если выполнилась успешно.
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-function.bind-textdomain-codeset-errors">
  <h3 class="title">Ошибки</h3>
  <p class="simpara">
   Функция выбрасывает ошибку <span class="exceptionname"><a href="class.valueerror.php" class="exceptionname">ValueError</a></span>,
   если в аргументе <code class="parameter">domain</code>
   передали пустую строку (<span class="type"><a href="language.types.string.php" class="type string">string</a></span>).
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.bind-textdomain-codeset-changelog">
  <h3 class="title">Список изменений</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Версия</th>
      <th>Описание</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.4.0</td>
      <td>
       Функция теперь выбрасывает ошибку <span class="exceptionname"><a href="class.valueerror.php" class="exceptionname">ValueError</a></span>,
       если значение параметра <code class="parameter">domain</code>
       является пустой строкой (<span class="type"><a href="language.types.string.php" class="type string">string</a></span>).
      </td>
     </tr>

     <tr>
      <td>8.4.0</td>
      <td>
       Параметр <code class="parameter">codeset</code> стал необязательным.
       Раньше параметр требовалось указывать при каждом вызове.
      </td>
     </tr>

     <tr>
      <td>8.0.3</td>
      <td>
       Параметр <code class="parameter">codeset</code> теперь принимает значение <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>.
       Раньше было невозможно получить текущую установленную кодировку.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 notes" id="refsect1-function.bind-textdomain-codeset-notes">
  <h3 class="title">Примечания</h3>
  <blockquote class="note"><p><strong class="note">Замечание</strong>: 
   <p class="para">
    Информация, которую устанавливает функция <span class="function"><strong>bind_textdomain_codeset()</strong></span>,
    сохраняется для каждого процесса, а не для потока.
   </p>
  </p></blockquote>
 </div>

</div><?php manual_footer($setup); ?>