
24.09.2002, 16:02
|
|
Регистрация: Jul 2002
Адрес: Ст.-Петербург
Сообщений: 268
|
Если ничего не помогает, прочтите наконец инструкцию...
Цитата:
iconv functions
This module contains an interface to the iconv library functions. To be able to use the functions defined in this module you must compile you PHP interpreter using the --with-iconv option. In order to do so, you must have iconv() function in standard C library or libiconv installed on your system. libiconv library is available from http://clisp.cons.org/~haible/packages-libiconv.html.
iconv library function converts files between various encoded character sets. The supported character sets depend on iconv() implementation on your system. Note that iconv() function in some system is not work well as you expect. In this case, you should install libiconv library.
Table of Contents
iconv — Convert string to requested character encoding
iconv_get_encoding — Get current setting for character encoding conversion
iconv_set_encoding — Set current setting for character encoding conversion
ob_iconv_handler — Convert character encoding as output buffer handler
iconv
(PHP 4 >= 4.0.5)
--==--==--==--==--==--==--
iconv -- Convert string to requested character encoding
Description
string iconv (string in_charset, string out_charset, string str)
It converts the string string encoded in in_charset to the string encoded in out_charset. It returns the converted string or FALSE, if it fails.
Example 1. iconv() example:
echo iconv("ISO-8859-1","UTF8","This is test.");
--==--==--==--==--==--==--
iconv_get_encoding
(PHP 4 >= 4.0.5)
iconv_get_encoding -- Get current setting for character encoding conversion
Description
array iconv_get_encoding ([string type])
It returns the current settings of ob_iconv_handler() as array or FALSE in failure.
See also: iconv_set_encoding() and ob_iconv_handler().
--==--==--==--==--==--==--
iconv_set_encoding
(PHP 4 >= 4.0.5)
iconv_set_encoding -- Set current setting for character encoding conversion
Description
array iconv_set_encoding (string type, string charset)
It changes the value of type to charset and returns TRUE in success or FALSE in failure.
Example 1. iconv_set_encoding() example:
iconv_set_encoding("internal_encoding", "UTF-8");
iconv_set_encoding("output_encoding", "ISO-8859-1");
See also: iconv_get_encoding() and ob_iconv_handler().
--==--==--==--==--==--==--
ob_iconv_handler
(PHP 4 >= 4.0.5)
ob_iconv_handler -- Convert character encoding as output buffer handler
Description
array ob_iconv_handler (string contents, int status)
It converts the string encoded in internal_encoding to output_encoding.
internal_encoding and output_encoding should be defined by iconv_set_encoding() or in configuration file.
Example 1. ob_iconv_handler() example:
ob_start("ob_iconv_handler"); // start output buffering
|
С уважением... 
|