<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >iconv Functions</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" TITLE="Manual do PHP" HREF="index.html"><LINK REL="UP" TITLE="Referência das Funções" HREF="funcref.html"><LINK REL="PREVIOUS" TITLE="icap_store_event" HREF="function.icap-store-event.html"><LINK REL="NEXT" TITLE="iconv_get_encoding" HREF="function.iconv-get-encoding.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8"></HEAD ><BODY CLASS="reference" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Manual do PHP</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.icap-store-event.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="function.iconv-get-encoding.html" ACCESSKEY="N" >Próxima</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="reference" ><A NAME="ref.iconv" ></A ><DIV CLASS="TITLEPAGE" ><H1 CLASS="title" >LXII. iconv Functions</H1 ><DIV CLASS="PARTINTRO" ><A NAME="AEN80027" ></A ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="iconv.intro" >Introdução</A ></H1 ><P > This module contains an interface to iconv character set conversion facility. With this module, you can turn a string represented by a local character set into the one represented by another character set, which may be the Unicode character set. Supported character sets depend on the iconv implementation of your system. Note that the iconv function on some systems may not work as you expect. In such case, it'd be a good idea to install the <A HREF="http://www.gnu.org/software/libiconv/" TARGET="_top" >GNU libiconv</A > library. It will most likely end up with more consistent results. </P ><P > Since <SPAN CLASS="application" >PHP</SPAN > 5.0.0, this extension comes with various utility functions that help you to write multilingual scripts. Let's have a look at the following sections to explore the new features. </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="iconv.requirements" >Dependências</A ></H1 ><P > You will need nothing if the system you are using is one of the recent POSIX-compliant systems because standard C libraries that are supplied in them must provide iconv facility. Otherwise, you have to get the <A HREF="http://www.gnu.org/software/libiconv/" TARGET="_top" >libiconv</A > library installed in your system. </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="iconv.installation" >Instalação</A ></H1 ><P > To use functions provided by this module, the <SPAN CLASS="application" >PHP</SPAN > binary must be built with the following configure line: <CODE CLASS="option" >--with-iconv[=DIR]</CODE >. </P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Note to Windows® Users: </B > In order to enable this module on a Windows® environment, you need to put a DLL file named <SPAN CLASS="emphasis" ><I CLASS="emphasis" >iconv.dll</I ></SPAN > or <SPAN CLASS="emphasis" ><I CLASS="emphasis" >iconv-1.3.dll</I ></SPAN > (prior to 4.2.1) which is bundled with the PHP/Win32 binary package into a directory specified by the <TT CLASS="literal" >PATH</TT > environment variable or one of the system directories of your Windows® installation. </P ><P > This module is part of PHP as of PHP 5 thus <SPAN CLASS="emphasis" ><I CLASS="emphasis" >iconv.dll</I ></SPAN > and <SPAN CLASS="emphasis" ><I CLASS="emphasis" >php_iconv.dll</I ></SPAN > is not needed anymore. </P ></BLOCKQUOTE ></DIV ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="iconv.configuration" >Configurações em execução</A ></H1 ><P > O comportamento dessas funções podem ser modificado pelas configurações do <TT CLASS="filename" >php.ini</TT >. </P ><P > <DIV CLASS="table" ><A NAME="AEN80057" ></A ><P ><B >Tabela 1. Iconv configuration options</B ></P ><TABLE BORDER="1" CLASS="CALSTABLE" ><COL><COL><COL><COL><THEAD ><TR ><TH >Name</TH ><TH >Default</TH ><TH >Changeable</TH ><TH >Changelog</TH ></TR ></THEAD ><TBODY ><TR ><TD >iconv.input_encoding</TD ><TD >"ISO-8859-1"</TD ><TD >PHP_INI_ALL</TD ><TD >Available since PHP 4.0.5.</TD ></TR ><TR ><TD >iconv.output_encoding</TD ><TD >"ISO-8859-1"</TD ><TD >PHP_INI_ALL</TD ><TD >Available since PHP 4.0.5.</TD ></TR ><TR ><TD >iconv.internal_encoding</TD ><TD >"ISO-8859-1"</TD ><TD >PHP_INI_ALL</TD ><TD >Available since PHP 4.0.5.</TD ></TR ></TBODY ></TABLE ></DIV > Para mais detalhes e definições das constantes PHP_INI_*, veja <A HREF="ini.html" >Apêndice H</A >. </P ><DIV CLASS="warning" ><P ></P ><TABLE CLASS="warning" BORDER="1" WIDTH="100%" ><TR ><TD ALIGN="CENTER" ><B >Atenção</B ></TD ></TR ><TR ><TD ALIGN="LEFT" ><P > Some systems (like IBM AIX) use "ISO8859-1" instead of "ISO-8859-1" so this value has to be used in configuration options and function parameters. </P ></TD ></TR ></TABLE ></DIV ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Nota: </B > Configuration option <CODE CLASS="parameter" >iconv.input_encoding</CODE > is currently not used for anything. </P ></BLOCKQUOTE ></DIV ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="iconv.resources" >Tipos Resource</A ></H1 ><P >Esta extensão não possui nenhum tipo resource.</P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="iconv.constants" >Constantes pré-definidas</A ></H1 ><P > Since <SPAN CLASS="application" >PHP</SPAN > 4.3.0 it is possible to identify at runtime which <TT CLASS="literal" >iconv</TT > implementation is adopted by this extension. <DIV CLASS="table" ><A NAME="AEN80096" ></A ><P ><B >Tabela 2. <TT CLASS="literal" >iconv</TT > constants</B ></P ><TABLE BORDER="1" CLASS="CALSTABLE" ><COL><COL><COL><THEAD ><TR ><TH >Name</TH ><TH >Type</TH ><TH >Description</TH ></TR ></THEAD ><TBODY ><TR ><TD >ICONV_IMPL</TD ><TD ><A HREF="language.types.string.html" ><B CLASS="type" >string</B ></A ></TD ><TD >The implementation name</TD ></TR ><TR ><TD >ICONV_VERSION</TD ><TD ><A HREF="language.types.string.html" ><B CLASS="type" >string</B ></A ></TD ><TD >The implementation version</TD ></TR ></TBODY ></TABLE ></DIV > </P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Nota: </B > Writing implementation-dependent scripts with these constants is strongly discouraged. </P ></BLOCKQUOTE ></DIV ><P > Since <SPAN CLASS="application" >PHP</SPAN > 5.0.0, the following constants are also available: <DIV CLASS="table" ><A NAME="AEN80120" ></A ><P ><B >Tabela 3. <TT CLASS="literal" >iconv</TT > constants available since PHP 5.0.0</B ></P ><TABLE BORDER="1" CLASS="CALSTABLE" ><COL><COL><COL><THEAD ><TR ><TH >Name</TH ><TH >Type</TH ><TH >Description</TH ></TR ></THEAD ><TBODY ><TR ><TD >ICONV_MIME_DECODE_STRICT</TD ><TD ><A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A ></TD ><TD >A bitmask used for <A HREF="function.iconv-mime-decode.html" ><B CLASS="function" >iconv_mime_decode()</B ></A ></TD ></TR ><TR ><TD >ICONV_MIME_DECODE_CONTINUE_ON_ERROR</TD ><TD ><A HREF="language.types.integer.html" ><B CLASS="type" >integer</B ></A ></TD ><TD >A bitmask used for <A HREF="function.iconv-mime-decode.html" ><B CLASS="function" >iconv_mime_decode()</B ></A ></TD ></TR ></TBODY ></TABLE ></DIV > </P ></DIV ><DIV CLASS="section" ><H1 CLASS="section" ><A NAME="iconv.seealso" >Veja também</A ></H1 ><P > See also <A HREF="ref.recode.html" >GNU Recode functions</A >. </P ></DIV ></DIV ><DIV CLASS="TOC" ><DL ><DT ><B >Índice</B ></DT ><DT ><A HREF="function.iconv-get-encoding.html" >iconv_get_encoding</A > -- Retrieve internal configuration variables of iconv extension</DT ><DT ><A HREF="function.iconv-mime-decode-headers.html" >iconv_mime_decode_headers</A > -- Decodes multiple <TT CLASS="literal" >MIME</TT > header fields at once</DT ><DT ><A HREF="function.iconv-mime-decode.html" >iconv_mime_decode</A > -- Decodes a <TT CLASS="literal" >MIME</TT > header field</DT ><DT ><A HREF="function.iconv-mime-encode.html" >iconv_mime_encode</A > -- Composes a <TT CLASS="literal" >MIME</TT > header field</DT ><DT ><A HREF="function.iconv-set-encoding.html" >iconv_set_encoding</A > -- Set current setting for character encoding conversion</DT ><DT ><A HREF="function.iconv-strlen.html" >iconv_strlen</A > -- Returns the character count of string</DT ><DT ><A HREF="function.iconv-strpos.html" >iconv_strpos</A > -- Finds position of first occurrence of a needle within a haystack</DT ><DT ><A HREF="function.iconv-strrpos.html" >iconv_strrpos</A > -- Finds the last occurrence of a needle within a haystack</DT ><DT ><A HREF="function.iconv-substr.html" >iconv_substr</A > -- Cut out part of a string</DT ><DT ><A HREF="function.iconv.html" >iconv</A > -- Convert string to requested character encoding</DT ><DT ><A HREF="function.ob-iconv-handler.html" >ob_iconv_handler</A > -- Convert character encoding as output buffer handler</DT ></DL ></DIV ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.icap-store-event.html" ACCESSKEY="P" >Anterior</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Principal</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="function.iconv-get-encoding.html" ACCESSKEY="N" >Próxima</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >icap_store_event</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="funcref.html" ACCESSKEY="U" >Acima</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >iconv_get_encoding</TD ></TR ></TABLE ></DIV ></BODY ></HTML >