Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: Unicode - Manual
[go: Go Back, main page]

PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

unicode_decode" width="11" height="7"/> <token_name
Last updated: Sun, 25 Nov 2007

view this page in

Unicode 関数

導入

Unicode をサポートします。

警告

この拡張モジュールは現在開発中のものであり、まだ一般には公開されていません。

要件

» ICU 3.4 あるいはそれ以降のバージョンが必要です。

インストール手順

まずはじめに ICU をダウンロードしてインストールします。

Example#1 Unix での ICU のインストール

./configure --disable-threads --enable-extras --enable-icuio --enable-layout
make && make install

それから、最新の PHP をチェックアウトして、 --with-icu-dir=<dir> オプション付きで configure します。<dir> には ICU をインストールしたディレクトリを指定します。 ICU を標準的な場所にインストールした場合は、 ディレクトリを明示的に指定する必要はありません。

実行時設定

php.ini の設定により動作が変化します。

Unicode 設定オプション
名前 デフォルト 変更の可否 変更履歴
unicode.fallback_encoding NULL PHP_INI_ALL PHP 6.0.0 以降で使用可能です。
unicode.from_error_mode "2" PHP_INI_ALL PHP 6.0.0 以降で使用可能です。
unicode.from_error_subst_char "3f" PHP_INI_ALL PHP 6.0.0 以降で使用可能です。
unicode.http_input_encoding NULL PHP_INI_ALL PHP 6.0.0 以降で使用可能です。
unicode.output_encoding NULL PHP_INI_ALL PHP 6.0.0 以降で使用可能です。
unicode.runtime_encoding NULL PHP_INI_ALL PHP 6.0.0 以降で使用可能です。
unicode.script_encoding NULL PHP_INI_ALL PHP 6.0.0 以降で使用可能です。
unicode.semantics "0" PHP_INI_SYSTEM PHP 6.0.0 以降で使用可能です。
PHP_INI_* 定数の詳細および定義については php.ini ディレクティブ を参照してください。

以下に設定ディレクティブに関する 簡単な説明を示します。

unicode.output_encoding string

出力用のデフォルトエンコーディング。

定義済み定数

以下の定数が定義されています。 この関数の拡張モジュールが PHP 組み込みでコンパイルされているか、 実行時に動的にロードされている場合のみ使用可能です。

定数 説明
U_INVALID_STOP 0 無効な文字が現れた時点で停止します。
U_INVALID_SKIP 1 無効な文字は読み飛ばします。
U_INVALID_SUBSTITUTE 2 無効な文字を置き換えます。
U_INVALID_ESCAPE 3 無効な文字をエスケープします。

目次



add a note add a note User Contributed Notes
Unicode
Hugo Dworak (post at o2 dot pl)
24-Nov-2005 12:04
If you are really interested in PHP 6 and its Unicode support you should read:
http://www.zend.com/zend/week/php-unicode-design.txt
(and in general http://www.zend.com/zend/week/)
plus cvs/php6/README.UNICODE and cvs/php6/README.UNICODE-UPGRADES

After you compile PHP 6, make sure that you have enabled unicode_semantics = on in php.ini (an old PHP 5 configuration file will not do as it does not provide those new Unicode-related options).

unicode_decode" width="11" height="7"/> <token_name
Last updated: Sun, 25 Nov 2007
 
 
show source | credits | sitemap | contact | advertising | mirror sites