mirror of
https://github.com/php/doc-pt_br.git
synced 2026-03-24 07:02:09 +01:00
422 lines
14 KiB
XML
422 lines
14 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: af844f698b38d1460464bf913a80f2397980c534 Maintainer: fernandowobeto Status: ready --><!-- CREDITS: fernandowobeto -->
|
|
<section xml:id="mbstring.configuration" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
&reftitle.runtime;
|
|
&extension.runtime;
|
|
<para>
|
|
<table>
|
|
<title>Opções de configuração do mbstring</title>
|
|
<tgroup cols="4">
|
|
<thead>
|
|
<row>
|
|
<entry>&Name;</entry>
|
|
<entry>&Default;</entry>
|
|
<entry>&Changeable;</entry>
|
|
<entry>&Changelog;</entry>
|
|
</row>
|
|
</thead>
|
|
<tbody xml:id="mbstring.configuration.list">
|
|
<row>
|
|
<entry><link linkend="ini.mbstring.language">mbstring.language</link></entry>
|
|
<entry>"neutral"</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.mbstring.detect-order">mbstring.detect_order</link></entry>
|
|
<entry>NULL</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.mbstring.http-input">mbstring.http_input</link></entry>
|
|
<entry>"pass"</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry>Descontinuado</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.mbstring.http-output">mbstring.http_output</link></entry>
|
|
<entry>"pass"</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry>Descontinuado</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.mbstring.internal-encoding">mbstring.internal_encoding</link></entry>
|
|
<entry>NULL</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry>Descontinuado</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.mbstring.substitute-character">mbstring.substitute_character</link></entry>
|
|
<entry>NULL</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.mbstring.func-overload">mbstring.func_overload</link></entry>
|
|
<entry>"0"</entry>
|
|
<entry><constant>INI_SYSTEM</constant></entry>
|
|
<entry>
|
|
Descontinuado a partir do PHP 7.2.0; removido a partir do PHP 8.0.0.
|
|
</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.mbstring.encoding-translation">mbstring.encoding_translation</link></entry>
|
|
<entry>"0"</entry>
|
|
<entry><constant>INI_PERDIR</constant></entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.mbstring.http-output-conv-mimetypes">mbstring.http_output_conv_mimetypes</link></entry>
|
|
<entry>"^(text/|application/xhtml\+xml)"</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.mbstring.strict-detection">mbstring.strict_detection</link></entry>
|
|
<entry>"0"</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry></entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.mbstring.regex-retry-limit">mbstring.regex_retry_limit</link></entry>
|
|
<entry>"1000000"</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry>Disponível a partir do PHP 7.4.0.</entry>
|
|
</row>
|
|
<row>
|
|
<entry><link linkend="ini.mbstring.regex-stack-limit">mbstring.regex_stack_limit</link></entry>
|
|
<entry>"100000"</entry>
|
|
<entry><constant>INI_ALL</constant></entry>
|
|
<entry>Disponível a partir do PHP 7.3.5.</entry>
|
|
</row>
|
|
</tbody>
|
|
</tgroup>
|
|
</table>
|
|
&ini.php.constants;
|
|
</para>
|
|
|
|
&ini.descriptions.title;
|
|
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry xml:id="ini.mbstring.language">
|
|
<term>
|
|
<parameter>mbstring.language</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
A configuração padrão do idioma nacional (NLS) usada no mbstring. Note que esta opção
|
|
define automaticamente <literal>mbstring.internal_encoding</literal> e
|
|
<literal>mbstring.internal_encoding</literal> deve ser colocada
|
|
após <literal>mbstring.language</literal> no &php.ini;
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.mbstring.encoding-translation">
|
|
<term>
|
|
<parameter>mbstring.encoding_translation</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Ativa o filtro de codificação de caracteres transparente para as consultas HTTP de entrada,
|
|
que realiza a detecção e conversão da codificação de entrada para a
|
|
codificação de caracteres interna.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.mbstring.internal-encoding">
|
|
<term>
|
|
<parameter>mbstring.internal_encoding</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<warning>
|
|
<para>&removed.php.future;</para>
|
|
</warning>
|
|
<para>
|
|
Define a codificação de caracteres interna padrão.
|
|
</para>
|
|
<para>
|
|
Os usuários devem deixar isso vazio e definir
|
|
<link linkend="ini.default-charset"><parameter>default_charset</parameter></link>
|
|
em vez disso.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.mbstring.http-input">
|
|
<term>
|
|
<parameter>mbstring.http_input</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<warning>
|
|
<para>&removed.php.future;</para>
|
|
</warning>
|
|
<para>
|
|
Define a codificação de caracteres de entrada HTTP padrão.
|
|
</para>
|
|
<para>
|
|
Os usuários devem deixar isso vazio e definir
|
|
<link linkend="ini.default-charset"><parameter>default_charset</parameter></link>
|
|
em vez disso.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.mbstring.http-output">
|
|
<term>
|
|
<parameter>mbstring.http_output</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<warning>
|
|
<para>&removed.php.future;</para>
|
|
</warning>
|
|
<para>
|
|
Define a codificação de caracteres de saída HTTP padrão (a saída será convertida da codificação interna para a codificação de saída HTTP na saída).
|
|
</para>
|
|
<para>
|
|
Os usuários devem deixar isso vazio e definir
|
|
<link linkend="ini.default-charset"><parameter>default_charset</parameter></link>
|
|
em vez disso.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.mbstring.detect-order">
|
|
<term>
|
|
<parameter>mbstring.detect_order</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Define a ordem padrão de detecção de código de caracteres. Veja também
|
|
<function>mb_detect_order</function>.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.mbstring.substitute-character">
|
|
<term>
|
|
<parameter>mbstring.substitute_character</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Define o caractere a ser substituído por codificação de caracteres inválida.
|
|
Veja <function>mb_substitute_character</function> para os valores suportados.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.mbstring.func-overload">
|
|
<term>
|
|
<parameter>mbstring.func_overload</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
&warn.deprecated.feature-7-2-0.removed-8-0-0;
|
|
<para>
|
|
Sobrecarrega um conjunto de funções de byte único pelas contrapartes do mbstring. Veja
|
|
<link linkend="mbstring.overload">Sobrecarga de Funções</link> para mais
|
|
informações.
|
|
</para>
|
|
<para>
|
|
Esta configuração só pode ser alterada no arquivo &php.ini;.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.mbstring.http-output-conv-mimetypes">
|
|
<term>
|
|
<parameter>mbstring.http_output_conv_mimetypes</parameter>
|
|
<type>string</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.mbstring.strict-detection">
|
|
<term>
|
|
<parameter>mbstring.strict_detection</parameter>
|
|
<type>bool</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Ativa a detecção estrita de codificação. Veja <function>mb_detect_encoding</function>
|
|
para uma descrição e exemplos.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.mbstring.regex-retry-limit">
|
|
<term>
|
|
<parameter>mbstring.regex_retry_limit</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Limita a quantidade de retrocesso que pode ser executada durante uma
|
|
correspondência de mbregex.
|
|
</para>
|
|
<para>
|
|
Esta configuração só tem efeito ao vincular contra oniguruma >= 6.8.0.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry xml:id="ini.mbstring.regex-stack-limit">
|
|
<term>
|
|
<parameter>mbstring.regex_stack_limit</parameter>
|
|
<type>int</type>
|
|
</term>
|
|
<listitem>
|
|
<para>
|
|
Limita a profundidade da pilha de expressões regulares mbstring.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
|
|
<para>
|
|
De acordo com a <link xlink:href="&url.spec.html401.accept-charset;">especificação HTML 4.01</link>,
|
|
os navegadores podem codificar um formulário sendo enviado com uma
|
|
codificação de caracteres diferente da usada para a página.
|
|
Veja <function>mb_http_input</function> para detectar a codificação de caracteres
|
|
usada pelos navegadores.
|
|
</para>
|
|
<para>
|
|
Embora os navegadores populares sejam capazes de fazer uma suposição razoavelmente precisa
|
|
sobre a codificação de caracteres de um documento HTML específico, seria melhor
|
|
definir o parâmetro <literal>charset</literal> no cabeçalho HTTP
|
|
<literal>Content-Type</literal> para o valor apropriado usando a função
|
|
<function>header</function> ou
|
|
a configuração ini <link linkend="ini.sect.data-handling">default_charset</link>.
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>Exemplos de configuração do &php.ini;</title>
|
|
<programlisting>
|
|
<![CDATA[
|
|
; Define idioma padrão
|
|
mbstring.language = Neutral; Define o idioma padrão como neutro (UTF-8) (padrão)
|
|
mbstring.language = English; Define o idioma padrão para inglês
|
|
mbstring.language = Japanese; Define o idioma padrão para japonês
|
|
|
|
;; Define a codificação interna padrão
|
|
;; Nota: Certifique-se de usar a codificação de caracteres que funciona com PHP
|
|
mbstring.internal_encoding = UTF-8 ; Define a codificação interna para UTF-8
|
|
|
|
;; A tradução da codificação de entrada HTTP está habilitada.
|
|
mbstring.encoding_translation = On
|
|
|
|
;; Define a codificação de caracteres de entrada HTTP padrão
|
|
;; Nota: O script não pode alterar a configuração http_input.
|
|
mbstring.http_input = pass ; Sem conversão.
|
|
mbstring.http_input = auto ; Define a entrada HTTP como automática
|
|
; "auto" é expandido de acordo com mbstring.language
|
|
mbstring.http_input = SJIS ; Define a entrada HTTP para SJIS
|
|
mbstring.http_input = UTF-8,SJIS,EUC-JP ; Especifica a ordenação
|
|
|
|
;; Define a codificação de caracteres de saída HTTP padrão
|
|
mbstring.http_output = pass ; Sem conversão
|
|
mbstring.http_output = UTF-8 ; Define a codificação de saída HTTP para UTF-8
|
|
|
|
;; Define a ordem de detecção de codificação de caracteres padrão
|
|
mbstring.detect_order = auto ; Define a ordem de detecção como automática
|
|
mbstring.detect_order = ASCII,JIS,UTF-8,SJIS,EUC-JP ; Especifica o pedido
|
|
|
|
;; Define o caractere substituto padrão
|
|
mbstring.substitute_character = 12307 ; Especifica o valor Unicode
|
|
mbstring.substitute_character = none ; Não imprime caractere
|
|
mbstring.substitute_character = long ; Exemplo longo: U+3000,JIS+7E7E
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>&php.ini; configuração para usuários <literal>EUC-JP</literal></title>
|
|
<programlisting>
|
|
<![CDATA[
|
|
;; Desativa buffer de saída
|
|
output_buffering = Off
|
|
|
|
;; Define conjunto de caracteres do cabeçalho HTTP
|
|
default_charset = EUC-JP
|
|
|
|
;; Define o idioma padrão para japonês
|
|
mbstring.language = Japanese
|
|
|
|
;; A tradução da codificação de entrada HTTP está habilitada
|
|
mbstring.encoding_translation = On
|
|
|
|
;; Define a conversão de codificação de entrada HTTP como automática
|
|
mbstring.http_input = auto
|
|
|
|
;; Converte saída HTTP para EUC-JP
|
|
mbstring.http_output = EUC-JP
|
|
|
|
;; Define a codificação interna para EUC-JP
|
|
mbstring.internal_encoding = EUC-JP
|
|
|
|
;; Não imprime caracteres inválidos
|
|
mbstring.substitute_character = none
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>&php.ini; configuração para usuários <literal>SJIS</literal></title>
|
|
<programlisting>
|
|
<![CDATA[
|
|
;; Habilita buffer de saída
|
|
output_buffering = On
|
|
|
|
;; Define mb_output_handler para ativar a conversão de saída
|
|
output_handler = mb_output_handler
|
|
|
|
;; Define o conjunto de caracteres do cabeçalho HTTP
|
|
default_charset = Shift_JIS
|
|
|
|
;; Define o idioma padrão para japonês
|
|
mbstring.language = Japanese
|
|
|
|
;; Define a conversão de codificação de entrada http como automática
|
|
mbstring.http_input = auto
|
|
|
|
;; Converte para SJIS
|
|
mbstring.http_output = SJIS
|
|
|
|
;; Define a codificação interna para EUC-JP
|
|
mbstring.internal_encoding = EUC-JP
|
|
|
|
;; Não imprime caracteres inválidos
|
|
mbstring.substitute_character = none
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
|
|
</section>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|