<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.iconv.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.iconv.php',
    1 => 'iconv',
    2 => 'Converte una stringa nella codifica di caratteri richiesta',
  ),
  'up' => 
  array (
    0 => 'ref.iconv.php',
    1 => 'iconv Funzioni',
  ),
  'prev' => 
  array (
    0 => 'ref.iconv.php',
    1 => 'iconv Funzioni',
  ),
  'next' => 
  array (
    0 => 'function.iconv-get-encoding.php',
    1 => 'iconv_get_encoding',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'it',
    'path' => 'reference/iconv/functions/iconv.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.iconv" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">iconv</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.5, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">iconv</span> &mdash; <span class="dc-title">Converte una stringa nella codifica di caratteri richiesta</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.iconv-description">
  <h3 class="title">Descrizione</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>iconv</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$in_charset</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$out_charset</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$str</code></span>): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>

  <p class="para rdfs-comment">
   Esegue una conversione del set di caratteri sulla stringa
   <code class="parameter">str</code> da <code class="parameter">in_charset</code>
   a <code class="parameter">out_charset</code>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.iconv-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">in_charset</code></dt>
     <dd>
      <p class="para">
       La codifica di caratteri di input.
      </p>
     </dd>
    
    
     <dt><code class="parameter">out_charset</code></dt>
     <dd>
      <p class="para">
       La codifica di caratteri di output.
      </p>
      <p class="para">
       Se si aggiunge la stringa <code class="literal">//TRANSLIT</code> a
       <code class="parameter">out_charset</code>, la traslitterazione verrà attivata. Questo
       significa che quando un carattere non può essere rappresentato nella codifica di caratteri voluta,
       esso può essere approssimato mediante uno o molti caratteri
       simili. Se si aggiunge la stringa <code class="literal">//IGNORE</code>,
       i caratteri che non possono essere rappresentati nella codifica di caratteri voluta sono scartati
       silenziosamente. In caso contrario, viene generato un <strong><code><a href="errorfunc.constants.php#constant.e-notice">E_NOTICE</a></code></strong> e la funzione
       restituirà <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>.
      </p>
     </dd>
    
    
     <dt><code class="parameter">str</code></dt>
     <dd>
      <p class="para">
       La stringa da convertire.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.iconv-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="para">
   Restituisce la stringa convertita o <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> in caso di fallimento.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.iconv-changelog">
   <h3 class="title">Log delle modifiche</h3>
   <p class="para">
    <table class="doctable informaltable">
     
      <thead>
       <tr>
        <th>Versione</th>
        <th>Descrizione</th>
       </tr>

      </thead>

      <tbody class="tbody">
       <tr>
        <td>5.4.0</td>
        <td>
            Da questa versione, la funzione restituisce <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> in caso di caratteri illegali, 
            a meno che non venga specificato <code class="literal">//IGNORE</code> nel charset di output. 
            Prima, questa funzione restituiva una stringa di output parziale.
        </td>
       </tr>

    </tbody>
   
  </table>

 </p>
</div>


 <div class="refsect1 examples" id="refsect1-function.iconv-examples">
  <h3 class="title">Esempi</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Example #1 Esempio di <span class="function"><strong>iconv()</strong></span></strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$text </span><span style="color: #007700">= </span><span style="color: #DD0000">"This is the Euro symbol '€'."</span><span style="color: #007700">;<br /><br />echo </span><span style="color: #DD0000">'Original : '</span><span style="color: #007700">, </span><span style="color: #0000BB">$text</span><span style="color: #007700">, </span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;<br />echo </span><span style="color: #DD0000">'TRANSLIT : '</span><span style="color: #007700">, </span><span style="color: #0000BB">iconv</span><span style="color: #007700">(</span><span style="color: #DD0000">"UTF-8"</span><span style="color: #007700">, </span><span style="color: #DD0000">"ISO-8859-1//TRANSLIT"</span><span style="color: #007700">, </span><span style="color: #0000BB">$text</span><span style="color: #007700">), </span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;<br />echo </span><span style="color: #DD0000">'IGNORE   : '</span><span style="color: #007700">, </span><span style="color: #0000BB">iconv</span><span style="color: #007700">(</span><span style="color: #DD0000">"UTF-8"</span><span style="color: #007700">, </span><span style="color: #DD0000">"ISO-8859-1//IGNORE"</span><span style="color: #007700">, </span><span style="color: #0000BB">$text</span><span style="color: #007700">), </span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;<br />echo </span><span style="color: #DD0000">'Plain    : '</span><span style="color: #007700">, </span><span style="color: #0000BB">iconv</span><span style="color: #007700">(</span><span style="color: #DD0000">"UTF-8"</span><span style="color: #007700">, </span><span style="color: #DD0000">"ISO-8859-1"</span><span style="color: #007700">, </span><span style="color: #0000BB">$text</span><span style="color: #007700">), </span><span style="color: #0000BB">PHP_EOL</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>Il precedente esempio visualizzerà
qualcosa simile a:</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">Original : This is the Euro symbol &#039;€&#039;.
TRANSLIT : This is the Euro symbol &#039;EUR&#039;.
IGNORE   : This is the Euro symbol &#039;&#039;.
Plain    :
Notice: iconv(): Detected an illegal character in input string in .\iconv-example.php on line 7</pre>
</div>
    </div>
   </div>
  </p>
 </div>




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