mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
added new mbstring option.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@95982 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
0f553e8585
commit
9be0bd6f95
2 changed files with 87 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<section id="mbstring.configuration">
|
||||
&reftitle.runtime;
|
||||
&extension.runtime;
|
||||
|
@ -69,6 +69,24 @@
|
|||
<para>
|
||||
Here is a short explanation of the configuration directives.
|
||||
<itemizedlist>
|
||||
<listitem id="ini.mbstring.language">
|
||||
<simpara>
|
||||
<literal>mbstring.language</literal> defines
|
||||
default language used in mbstring.
|
||||
Note that this option defines
|
||||
<literal>mbstring.interanl_encoding</literal>
|
||||
and <literal>mbstring.interanl_encoding</literal>
|
||||
should be placed after <literal>mbstring.language</literal>
|
||||
in &php.ini;
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem id="ini.mbstring.encoding-translation">
|
||||
<simpara>
|
||||
<literal>mbstring.encoding_translation</literal> enables
|
||||
HTTP input character encoding detection and translation into
|
||||
internal chatacter encoding.
|
||||
</simpara>
|
||||
</listitem>
|
||||
<listitem id="ini.mbstring.internal-encoding">
|
||||
<simpara>
|
||||
<literal>mbstring.internal_encoding</literal> defines default
|
||||
|
@ -138,10 +156,17 @@
|
|||
<title>&php.ini; setting example</title>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
; Set default language
|
||||
mbstring.language = English; Set default language to English (default)
|
||||
mbstring.language = Japanese; Set default language to Japanese
|
||||
|
||||
;; 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
|
||||
|
||||
;; HTTP input encoding translation is enabled.
|
||||
mbstring.encoding_translation = On
|
||||
|
||||
;; Set default HTTP input character encoding
|
||||
;; Note: Script cannot change http_input setting.
|
||||
mbstring.http_input = pass ; No conversion.
|
||||
|
@ -177,6 +202,12 @@ output_buffering = Off
|
|||
;; Set HTTP header charset
|
||||
default_charset = EUC-JP
|
||||
|
||||
;; Set default language to Japanese
|
||||
mbstring.language = Japanese
|
||||
|
||||
;; HTTP input encoding translation is enabled.
|
||||
mbstring.encoding_translation = On
|
||||
|
||||
;; Set HTTP input encoding conversion to auto
|
||||
mbstring.http_input = auto
|
||||
|
||||
|
@ -206,6 +237,9 @@ output_handler = mb_output_handler
|
|||
;; Set HTTP header charset
|
||||
default_charset = Shift_JIS
|
||||
|
||||
;; Set default language to Japanese
|
||||
mbstring.language = Japanese
|
||||
|
||||
;; Set http input encoding conversion to auto
|
||||
mbstring.http_input = auto
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- $Revision: 1.6 $ -->
|
||||
<reference id="ref.mbstring">
|
||||
<title>Multi-Byte String Functions</title>
|
||||
<titleabbrev>Multi-Byte String</titleabbrev>
|
||||
|
@ -115,6 +115,30 @@ JIS, SJIS
|
|||
<literal>mbstring</literal> functions. This option is
|
||||
required to use <literal>mbstring</literal> functions.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
As of PHP 4.3.0, the option
|
||||
<option role="configure">--enable-mbstring</option>
|
||||
will be enabled by default and replaced with
|
||||
<option role="configure">--with-mbstring[=LANG]</option>
|
||||
to support Chinese, Korean and Russian language support.
|
||||
Japanese character encoding is supported by default.
|
||||
If <option role="configure">--with-mbstring=cn</option>
|
||||
is used, simplified chinese encoding will be supported.
|
||||
If <option role="configure">--with-mbstring=tw</option>
|
||||
is used, traditional chinese encoding will be supported.
|
||||
If <option role="configure">--with-mbstring=kr</option>
|
||||
is used, korean encoding will be supported.
|
||||
If <option role="configure">--with-mbstring=ru</option>
|
||||
is used, russian encoding will be supported.
|
||||
If <option role="configure">--with-mbstring=all</option>
|
||||
is added, all supported character encoding in mbstring
|
||||
will be enabled, but the binary size of PHP will be
|
||||
maximized because of huge Unicode character maps.
|
||||
Note that Chinese, Korean and Russian encoding is
|
||||
experimentally supported in PHP 4.3.0.
|
||||
</para>
|
||||
</note>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
|
@ -125,6 +149,17 @@ JIS, SJIS
|
|||
converted to <literal>mbstring.internal_encoding</literal>
|
||||
automatically.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
As of PHP 4.3.0, the option
|
||||
<option role="configure">--enable-mbstr-enc-trans</option>
|
||||
will be eliminated and replaced with
|
||||
<literal>mbstring.encoding_translation</literal>.
|
||||
HTTP input character encoding conversion is enabled
|
||||
when this is set to <literal>On</literal>
|
||||
(the default is <literal>Off</literal>).
|
||||
</para>
|
||||
</note>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>
|
||||
|
@ -166,7 +201,8 @@ JIS, SJIS
|
|||
<simpara>
|
||||
HTTP Input
|
||||
</simpara>
|
||||
<para> There is no way to control HTTP input character
|
||||
<para>
|
||||
There is no way to control HTTP input character
|
||||
conversion from PHP script. To disable HTTP input character
|
||||
conversion, it has to be done in &php.ini;.
|
||||
<example>
|
||||
|
@ -177,6 +213,8 @@ JIS, SJIS
|
|||
<![CDATA[
|
||||
;; Disable HTTP Input conversion
|
||||
mbstring.http_input = pass
|
||||
;; Disable HTTP Input conversion (PHP 4.3.0 or higher)
|
||||
mbstring.encoding_translation = Off
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
|
@ -286,6 +324,18 @@ ob_start('mb_output_handler');
|
|||
<literal>7bit</literal>, <literal>8bit</literal> and
|
||||
<literal>UTF7-IMAP</literal>.
|
||||
</para>
|
||||
<para>
|
||||
As of PHP 4.3.0, the following character encoding support will be added
|
||||
experimentaly :
|
||||
<literal>EUC-CN</literal>, <literal>CP936</literal>, <literal>HZ</literal>,
|
||||
<literal>EUC-TW</literal>, <literal>CP950</literal>, <literal>BIG-5</literal>,
|
||||
<literal>EUC-KR</literal>, <literal>UHC</literal> (<literal>CP949</literal>),
|
||||
<literal>ISO-2022-KR</literal>,
|
||||
<literal>Windows-1251</literal> (<literal>CP1251</literal>),
|
||||
<literal>Windows-1252</literal> (<literal>CP1252</literal>),
|
||||
<literal>CP866</literal>,
|
||||
<literal>KOI8-R</literal>.
|
||||
</para>
|
||||
<para>
|
||||
&php.ini; entry, which accepts encoding name,
|
||||
accepts "<literal>auto</literal>" and
|
||||
|
|
Loading…
Reference in a new issue