PHP: Unicode Functions - Manual

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

search for in the

i18n_loc_get_default token_name

Last updated: Fri, 26 Jan 2007

view this page in

# CLXIV. Unicode Functions

# Введение

Unicode Support.

Внимание
This extension is still in development and it isn't available to public yet.

# Требования

ICU 3.4 or later is required.

# Установка

First you should download and install ICU:

Пример 1. install ICU on Unix

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

Then checkout latest PHP and configure it `--with-icu-dir=<dir>` option, where <dir> was the dir to where you installed ICU. You don't need to explicitly use this option if you install ICU to a standard location.

# Настройка во время выполнения

Поведение этих функций зависит от установок в `php.ini`.

Таблица 1. Unicode Configuration Options

Name | Default | Changeable | Changelog
--- | --- | --- | ---
unicode.fallback_encoding | NULL | PHP_INI_ALL | Available since PHP 6.0.0.
unicode.from_error_mode | "2" | PHP_INI_ALL | Available since PHP 6.0.0.
unicode.from_error_subst_char | "3f" | PHP_INI_ALL | Available since PHP 6.0.0.
unicode.http_input_encoding | NULL | PHP_INI_ALL | Available since PHP 6.0.0.
unicode.output_encoding | NULL | PHP_INI_ALL | Available since PHP 6.0.0.
unicode.runtime_encoding | NULL | PHP_INI_ALL | Available since PHP 6.0.0.
unicode.script_encoding | NULL | PHP_INI_ALL | Available since PHP 6.0.0.
unicode.semantics | off | PHP_INI_PERDIR | Available since PHP 6.0.0.

Для подробного описания констант PHP_INI_*, обратитесь к документации функции ini_set().

Краткое разъяснение конфигурационных директив.

`unicode.output_encoding` string

  Default encoding for output.

# Предопределенные константы

Перечисленные ниже константы определены данным расширением и могут быть доступны только в том случае, если PHP был собран с поддержкой этого расширения или же в том случае, если данное расширение подгружается во время выполнения.

Таблица 2.

constant | value | description
--- | --- | ---
U_INVALID_STOP | 0 | stop at first invalid character
U_INVALID_SKIP | 1 | skip invalid characters
U_INVALID_SUBSTITUTE | 2 | replace invalid characters
U_INVALID_ESCAPE | 3 | escape invalid characters

add a note User Contributed Notes
Unicode Functions
Hugo Dworak (post at o2 dot pl)
23-Nov-2005 07: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).`
add a note
i18n_loc_get_default token_name

Last updated: Fri, 26 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 11:33:19 2007 PST