XL. Iconv

Introduction

Ce module est une interface vers la librairie iconv. L'extension iconv convertit des fichiers entre divers jeux de caractères. Les jeux supportés dépendent de l'implémentation de iconv() sur votre système. Notez que cette fonction ne fonctionne pas toujours bien sur tous les systèmes. Dans ce cas, vous devez installer la librairie tout de même.

Pré-requis

Pour cela, vous devez avoir la fonction iconv() dans votre librairie standard C, ou bien la librairie libiconv installée sur votre système. La librairie libiconv est disponible à http://www.gnu.org/software/libiconv/.

Installation

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

Configuration à l'exécution

Le comportement de ces fonctions est affecté par la configuration dans le fichier php.ini.

Tableau 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().

Types de ressources

Cette extension ne définit aucune ressource.

Constantes prédefinies

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

Tableau 2. iconv constants

constanttypedescription
ICONV_IMPLstringThe implementation name
ICONV_VERSIONstringThe implementation version

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

Voir aussi

Voir aussi les fonctions GNU Recode.

Table des matières
iconv_get_encoding --  Lit le jeu de caractères courant
iconv_mime_decode --  Decodes a mime header field
iconv_mime_encode --  Composes a mime header field with field_name and field_value in a specified scheme
iconv_set_encoding --  Modifie le jeu courant de caractères courant
iconv_strlen --  Retourne le nombre de caractères d'une chaîne
iconv_strpos --  Trouve la position de la première occurence de needle dans haystack
iconv_strrpos --  Finds position of last occurrence of needle within part of haystack beginning with offset
iconv_substr --  Returns specified part of a string
iconv -- Convertit une chaîne dans un jeu de caractères
ob_iconv_handler --  Gestionnaire de sortie pour maitriser le jeu de caractères de sortie