Ten moduł zawiera interfejs do funkcji biblioteki iconv. Funkcje bilioteki iconv konwertują stringi pomiędzy różnymi zestawami znaków. Obsługa określonych zestawów znaków jest zależna od implementacji iconv() w twoim systemie. Proszę pamiętać, że w niektórych systemach funkcja iconv() działa niezgodnie z oczekiwaniami. W takich przypadkach należy zainstalować bibliotekę libiconv.
Trzeba mieć funkcję iconv() w standardowej bibliotece C, lub zainstalowaną bibliotekę libiconv. Biblioteka libiconv jest dostępna pod adresem http://www.gnu.org/software/libiconv/.
To use functions provided by this module, the PHP binary must be built with the following configure line: --with-iconv[=DIR].
Note to Windows® Users: In order to enable this module on a Windows® environment, you need to put a DLL file named iconv.dll or iconv-1.3.dll (prior to 4.2.1) which is bundled with the PHP/Win32 binary package into a directory specified by the PATH environment variable or one of the system directories of your Windows® installation.
Na działanie tych funcji wpływają ustawienia zawarte w pliku php.ini.
Tabela 1. Iconv configuration options
Name | Default | Changeable |
---|---|---|
iconv.input_encoding | ICONV_INPUT_ENCODING | PHP_INI_ALL |
iconv.output_encoding | ICONV_OUTPUT_ENCODING | PHP_INI_ALL |
iconv.internal_encoding | ICONV_INTERNAL_ENCODING | PHP_INI_ALL |
Since PHP 4.3.0 it is possible to identify at runtime which iconv implementation is adopted by this extension.
Tabela 2. iconv constants
Name | Type | Description |
---|---|---|
ICONV_IMPL | string | The implementation name |
ICONV_VERSION | string | The implementation version |
Notatka: Writing implementation-dependent scripts with these constants is strongly discouraged.
Since PHP 5.0.0, the following constants are also available:
Tabela 3. iconv constants available since PHP 5.0.0
Name | Type | Description |
---|---|---|
ICONV_MIME_DECODE_STRICT | integer | A bitmask used for iconv_mime_decode() |
ICONV_MIME_DECODE_CONTINUE_ON_ERROR | integer | A bitmask used for iconv_mime_decode() |
Patrz także: funkcje GNU Recode
Poprzedni | Spis treści | Następny |
hw_api->userlist | Początek rozdziału | iconv_get_encoding |