2010-03-28 22:10:10 +00:00
<?xml version="1.0" encoding="utf-8"?>
2009-07-11 07:57:45 +00:00
<!-- $Revision$ -->
2007-06-20 22:25:43 +00:00
<section xml:id= "mbstring.configuration" xmlns= "http://docbook.org/ns/docbook" xmlns:xlink= "http://www.w3.org/1999/xlink" >
2002-09-14 21:26:46 +00:00
&reftitle.runtime;
&extension.runtime;
<para >
2004-03-13 11:45:37 +00:00
<table >
<title > mbstring configuration options</title>
2005-02-22 17:36:12 +00:00
<tgroup cols= "4" >
2004-03-13 11:45:37 +00:00
<thead >
<row >
2012-01-11 08:09:53 +00:00
<entry > &Name; </entry>
<entry > &Default; </entry>
<entry > &Changeable; </entry>
<entry > &Changelog; </entry>
2004-03-13 11:45:37 +00:00
</row>
</thead>
<tbody >
<row >
2009-01-09 17:33:40 +00:00
<entry > <link linkend= "ini.mbstring.language" > mbstring.language</link> </entry>
2004-03-13 11:45:37 +00:00
<entry > "neutral"</entry>
2012-02-29 00:24:15 +00:00
<entry > PHP_INI_ALL</entry>
2010-05-27 17:18:43 +00:00
<entry >
2012-11-12 02:42:57 +00:00
Available since PHP 4.3.0. PHP_INI_PERDIR in PHP < = 5.2.6
2010-05-27 17:18:43 +00:00
</entry>
2004-03-13 11:45:37 +00:00
</row>
<row >
2009-01-09 17:33:40 +00:00
<entry > <link linkend= "ini.mbstring.detect-order" > mbstring.detect_order</link> </entry>
2004-03-13 11:45:37 +00:00
<entry > NULL</entry>
2012-02-29 00:24:15 +00:00
<entry > PHP_INI_ALL</entry>
2005-02-22 17:36:12 +00:00
<entry > Available since PHP 4.0.6.</entry>
2004-03-13 11:45:37 +00:00
</row>
<row >
2009-01-09 17:33:40 +00:00
<entry > <link linkend= "ini.mbstring.http-input" > mbstring.http_input</link> </entry>
2004-03-13 11:45:37 +00:00
<entry > "pass"</entry>
2012-02-29 00:24:15 +00:00
<entry > PHP_INI_ALL</entry>
2005-02-22 17:36:12 +00:00
<entry > Available since PHP 4.0.6.</entry>
2004-03-13 11:45:37 +00:00
</row>
<row >
2009-01-09 17:33:40 +00:00
<entry > <link linkend= "ini.mbstring.http-output" > mbstring.http_output</link> </entry>
2004-03-13 11:45:37 +00:00
<entry > "pass"</entry>
2012-02-29 00:24:15 +00:00
<entry > PHP_INI_ALL</entry>
2005-02-22 17:36:12 +00:00
<entry > Available since PHP 4.0.6.</entry>
2004-03-13 11:45:37 +00:00
</row>
<row >
2009-01-09 17:33:40 +00:00
<entry > <link linkend= "ini.mbstring.internal-encoding" > mbstring.internal_encoding</link> </entry>
2004-03-13 11:45:37 +00:00
<entry > NULL</entry>
2012-02-29 00:24:15 +00:00
<entry > PHP_INI_ALL</entry>
2005-02-22 17:36:12 +00:00
<entry > Available since PHP 4.0.6.</entry>
2004-03-13 11:45:37 +00:00
</row>
<row >
<entry > mbstring.script_encoding</entry>
<entry > NULL</entry>
2012-02-29 00:24:15 +00:00
<entry > PHP_INI_ALL</entry>
2014-01-28 02:44:43 +00:00
<entry > Available since PHP 4.3.0. Removed in PHP 5.4.0. Use <link linkend= "ini.zend.script-encoding" > zend.script_encoding</link> instead.</entry>
2004-03-13 11:45:37 +00:00
</row>
<row >
2009-01-09 17:33:40 +00:00
<entry > <link linkend= "ini.mbstring.substitute-character" > mbstring.substitute_character</link> </entry>
2004-03-13 11:45:37 +00:00
<entry > NULL</entry>
2012-02-29 00:24:15 +00:00
<entry > PHP_INI_ALL</entry>
2005-02-22 17:36:12 +00:00
<entry > Available since PHP 4.0.6.</entry>
2004-03-13 11:45:37 +00:00
</row>
<row >
2009-01-09 17:33:40 +00:00
<entry > <link linkend= "ini.mbstring.func-overload" > mbstring.func_overload</link> </entry>
2004-03-13 11:45:37 +00:00
<entry > "0"</entry>
2012-02-29 00:24:15 +00:00
<entry > PHP_INI_SYSTEM</entry>
2010-01-07 11:23:39 +00:00
<entry >
2012-11-12 02:42:57 +00:00
PHP_INI_PERDIR from PHP 4.3 to 5.2.6, otherwise PHP_INI_SYSTEM.
Available since PHP 4.2.0.
2010-01-07 11:23:39 +00:00
</entry>
2004-03-13 11:45:37 +00:00
</row>
<row >
2009-01-09 17:33:40 +00:00
<entry > <link linkend= "ini.mbstring.encoding-translation" > mbstring.encoding_translation</link> </entry>
2004-03-13 11:45:37 +00:00
<entry > "0"</entry>
2012-02-29 00:24:15 +00:00
<entry > PHP_INI_PERDIR</entry>
2005-02-22 17:36:12 +00:00
<entry > Available since PHP 4.3.0.</entry>
2004-03-13 11:45:37 +00:00
</row>
2006-01-21 04:25:50 +00:00
<row >
2009-01-09 17:33:40 +00:00
<entry > <link linkend= "ini.mbstring.strict-detection" > mbstring.strict_detection</link> </entry>
2006-01-21 04:25:50 +00:00
<entry > "0"</entry>
2012-02-29 00:24:15 +00:00
<entry > PHP_INI_ALL</entry>
2006-01-21 04:25:50 +00:00
<entry > Available since PHP 5.1.2.</entry>
</row>
2004-03-13 11:45:37 +00:00
</tbody>
</tgroup>
</table>
2008-11-26 05:26:39 +00:00
&ini.php.constants;
2002-09-14 21:26:46 +00:00
</para>
2003-05-01 21:52:58 +00:00
&ini.descriptions.title;
2002-09-14 21:26:46 +00:00
<para >
2004-07-21 08:40:46 +00:00
<variablelist >
2007-06-20 22:25:43 +00:00
<varlistentry xml:id= "ini.mbstring.language" >
2004-07-21 08:40:46 +00:00
<term >
<parameter > mbstring.language</parameter>
<type > string</type>
</term>
<listitem >
<para >
The default national language setting (NLS) used in mbstring. Note that this option
automagically defines <literal > mbstring.internal_encoding</literal> and
<literal > mbstring.internal_encoding</literal> should be placed
after <literal > mbstring.language</literal> in &php.ini;
</para>
</listitem>
</varlistentry>
2007-06-20 22:25:43 +00:00
<varlistentry xml:id= "ini.mbstring.encoding-translation" >
2004-07-21 08:40:46 +00:00
<term >
<parameter > mbstring.encoding_translation</parameter>
<type > boolean</type>
</term>
<listitem >
<para >
Enables the transparent character encoding filter for the incoming HTTP queries,
which performs detection and conversion of the input encoding to the
internal character encoding.
</para>
</listitem>
</varlistentry>
2007-06-20 22:25:43 +00:00
<varlistentry xml:id= "ini.mbstring.internal-encoding" >
2004-07-21 08:40:46 +00:00
<term >
<parameter > mbstring.internal_encoding</parameter>
<type > string</type>
</term>
<listitem >
<para >
2014-02-14 04:46:43 +00:00
Defines the default internal character encoding. Since PHP 5.6.0, if this setting is empty, <link linkend= "ini.default-charset" > default_charset</link> is used.
2004-07-21 08:40:46 +00:00
</para>
</listitem>
</varlistentry>
2007-06-20 22:25:43 +00:00
<varlistentry xml:id= "ini.mbstring.http-input" >
2004-07-21 08:40:46 +00:00
<term >
<parameter > mbstring.http_input</parameter>
<type > string</type>
</term>
<listitem >
<para >
Defines the default HTTP input character encoding.
</para>
</listitem>
</varlistentry>
2007-06-20 22:25:43 +00:00
<varlistentry xml:id= "ini.mbstring.http-output" >
2004-07-21 08:40:46 +00:00
<term >
<parameter > mbstring.http_output</parameter>
<type > string</type>
</term>
<listitem >
<para >
Defines the default HTTP output character encoding.
</para>
</listitem>
</varlistentry>
2007-06-20 22:25:43 +00:00
<varlistentry xml:id= "ini.mbstring.detect-order" >
2004-07-21 08:40:46 +00:00
<term >
<parameter > mbstring.detect_order</parameter>
<type > string</type>
</term>
<listitem >
<para >
Defines default character code detection order. See also
<function > mb_detect_order</function> .
</para>
</listitem>
</varlistentry>
2007-06-20 22:25:43 +00:00
<varlistentry xml:id= "ini.mbstring.substitute-character" >
2004-07-21 08:40:46 +00:00
<term >
<parameter > mbstring.substitute_character</parameter>
<type > string</type>
</term>
<listitem >
<para >
Defines character to substitute for invalid character encoding.
</para>
</listitem>
</varlistentry>
2007-06-20 22:25:43 +00:00
<varlistentry xml:id= "ini.mbstring.func-overload" >
2004-07-21 08:40:46 +00:00
<term >
<parameter > mbstring.func_overload</parameter>
<type > string</type>
</term>
<listitem >
<para >
Overloads a set of single byte functions by the mbstring counterparts. See
2004-12-22 09:58:35 +00:00
<link linkend= "mbstring.overload" > Function overloading</link> for more
2004-07-21 08:40:46 +00:00
information.
</para>
2012-11-12 02:42:57 +00:00
<para >
This setting can only be changed from the &php.ini; file.
</para>
2004-07-21 08:40:46 +00:00
</listitem>
</varlistentry>
2007-06-20 22:25:43 +00:00
<varlistentry xml:id= "ini.mbstring.strict-detection" >
2006-01-21 04:25:50 +00:00
<term >
<parameter > mbstring.strict_detection</parameter>
<type > boolean</type>
</term>
<listitem >
<para >
Enables the strict encoding detection.
</para>
</listitem>
</varlistentry>
2004-07-21 08:40:46 +00:00
</variablelist>
2002-09-14 21:26:46 +00:00
</para>
2004-07-21 08:40:46 +00:00
2002-09-14 21:26:46 +00:00
<para >
2009-05-08 16:39:26 +00:00
According to the <link xlink:href= "&url.spec.html401.accept-charset;" > HTML 4.01 specification</link> ,
2004-03-13 23:47:09 +00:00
Web browsers are allowed to encode a form being submitted with a character
2004-03-13 11:45:37 +00:00
encoding different from the one used for the page.
See <function > mb_http_input</function> to detect character encoding
used by browsers.
2002-09-14 21:26:46 +00:00
</para>
<para >
2004-03-13 23:41:01 +00:00
Although popular browsers are capable of giving a reasonably accurate guess
to the character encoding of a given HTML document, it would be better to
set the <literal > charset</literal> parameter in the
<literal > Content-Type</literal> HTTP header to the appropriate value by
<function > header</function> or
2004-03-13 11:45:37 +00:00
<link linkend= "ini.sect.data-handling" > default_charset</link> ini setting.
2002-09-14 21:26:46 +00:00
</para>
<para >
<example >
2004-03-13 11:45:37 +00:00
<title > &php.ini; setting examples</title>
2002-09-14 21:26:46 +00:00
<programlisting >
< ![CDATA[
2002-09-17 16:56:29 +00:00
; Set default language
2003-08-28 15:04:19 +00:00
mbstring.language = Neutral; Set default language to Neutral(UTF-8) (default)
mbstring.language = English; Set default language to English
2002-09-17 16:56:29 +00:00
mbstring.language = Japanese; Set default language to Japanese
2002-09-14 21:26:46 +00:00
;; Set default internal encoding
;; Note: Make sure to use character encoding works with PHP
mbstring.internal_encoding = UTF-8 ; Set internal encoding to UTF-8
2002-09-17 16:56:29 +00:00
;; HTTP input encoding translation is enabled.
mbstring.encoding_translation = On
2002-09-14 21:26:46 +00:00
;; Set default HTTP input character encoding
;; Note: Script cannot change http_input setting.
mbstring.http_input = pass ; No conversion.
mbstring.http_input = auto ; Set HTTP input to auto
2011-02-10 12:52:47 +00:00
; "auto" is expanded according to mbstring.language
2011-11-16 13:13:34 +00:00
mbstring.http_input = SJIS ; Set HTTP input to SJIS
2002-09-14 21:26:46 +00:00
mbstring.http_input = UTF-8,SJIS,EUC-JP ; Specify order
;; Set default HTTP output character encoding
mbstring.http_output = pass ; No conversion
mbstring.http_output = UTF-8 ; Set HTTP output encoding to UTF-8
;; Set default character encoding detection order
mbstring.detect_order = auto ; Set detect order to auto
mbstring.detect_order = ASCII,JIS,UTF-8,SJIS,EUC-JP ; Specify order
;; Set default substitute character
mbstring.substitute_character = 12307 ; Specify Unicode value
mbstring.substitute_character = none ; Do not print character
mbstring.substitute_character = long ; Long Example: U+3000,JIS+7E7E
]]>
</programlisting>
</example>
</para>
<para >
<example >
<title > &php.ini; setting for <literal > EUC-JP</literal> users</title>
<programlisting >
< ![CDATA[
;; Disable Output Buffering
output_buffering = Off
;; Set HTTP header charset
default_charset = EUC-JP
2002-09-17 16:56:29 +00:00
;; Set default language to Japanese
mbstring.language = Japanese
;; HTTP input encoding translation is enabled.
mbstring.encoding_translation = On
2002-09-14 21:26:46 +00:00
;; Set HTTP input encoding conversion to auto
mbstring.http_input = auto
;; Convert HTTP output to EUC-JP
mbstring.http_output = EUC-JP
;; Set internal encoding to EUC-JP
mbstring.internal_encoding = EUC-JP
;; Do not print invalid characters
mbstring.substitute_character = none
]]>
</programlisting>
</example>
</para>
<para >
<example >
<title > &php.ini; setting for <literal > SJIS</literal> users</title>
<programlisting >
< ![CDATA[
;; Enable Output Buffering
output_buffering = On
;; Set mb_output_handler to enable output conversion
output_handler = mb_output_handler
;; Set HTTP header charset
default_charset = Shift_JIS
2002-09-17 16:56:29 +00:00
;; Set default language to Japanese
mbstring.language = Japanese
2002-09-14 21:26:46 +00:00
;; Set http input encoding conversion to auto
mbstring.http_input = auto
;; Convert to SJIS
mbstring.http_output = SJIS
;; Set internal encoding to EUC-JP
mbstring.internal_encoding = EUC-JP
;; Do not print invalid characters
mbstring.substitute_character = none
]]>
</programlisting>
</example>
2002-09-15 10:19:42 +00:00
</para>
2002-09-14 21:26:46 +00:00
</section>
2002-09-15 10:19:42 +00:00
2002-09-14 21:26:46 +00:00
<!-- 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
2009-09-25 07:04:39 +00:00
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
2002-09-14 21:26:46 +00:00
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
-->