XL. iconv

Wprowadzenie

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.

Wymagania

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/.

Instalacja

To be able to use the functions defined in this module you must compile your PHP interpreter using the configure line --with-iconv[=DIR].

Note to Win32 Users: In order to enable this module on a Windows environment, you must copy iconv-1.3.dll from the DLL folder of the PHP/Win32 binary package to the SYSTEM32 folder of your windows machine. (Ex: C:\WINNT\SYSTEM32 or C:\WINDOWS\SYSTEM32). Starting with PHP 4.2.1 the name changed to iconv.dll

Konfiguracja startowa

The behaviour of these functions is affected by settings in php.ini.

Tabela 1. Iconv configuration options

NameDefaultChangeable
iconv.input_encodingICONV_INPUT_ENCODINGPHP_INI_ALL
iconv.output_encodingICONV_OUTPUT_ENCODINGPHP_INI_ALL
iconv.internal_encodingICONV_INTERNAL_ENCODINGPHP_INI_ALL
For further details and definition of the PHP_INI_* constants see ini_set().

Typy zasobów

To rozszerzenie nie definiuje żadnych rodzajów zasobów.

Predefiniowane stałe

Since PHP 4.3.0 it is possible to identify at runtime which iconv implementation is adopted by this extension.

Tabela 2. iconv constants

constanttypedescription
ICONV_IMPLstringThe implementation name
ICONV_VERSIONstringThe implementation version

Notatka: Writing implementation-dependent scripts with these constants should be discouraged.

Zobacz również

Patrz także: funkcje GNU Recode

Spis treści
iconv_get_encoding -- Pobiera aktualne ustawienia dla konwersji zestawu znaków
iconv_set_encoding -- Ustawia aktualne ustawienia dla konwersji zestawu znaków
iconv -- Konwertuje łańcuch znaków do innego zestawu znaków
ob_iconv_handler -- Konwersja kodowania znaków jako uchwyt buforu wyjścia