安装/配置
在线手册:中文 英文
PHP手册

运行时配置

这些函数的行为受 php.ini 中的设置影响。

Iconv 配置选项
名字 默认 可修改范围 更新日志
iconv.input_encoding "ISO-8859-1" PHP_INI_ALL Available since PHP 4.0.5.
iconv.output_encoding "ISO-8859-1" PHP_INI_ALL Available since PHP 4.0.5.
iconv.internal_encoding "ISO-8859-1" PHP_INI_ALL Available since PHP 4.0.5.

这是配置指令的简短说明。

Warning

Some systems (like IBM AIX) use "ISO8859-1" instead of "ISO-8859-1" so this value has to be used in configuration options and function parameters.

iconv.input_encoding string

Currently this option is not used.

iconv.output_encoding string

iconv.internal_encoding string


安装/配置
在线手册:中文 英文
PHP手册
PHP手册 - N: 运行时配置

用户评论:

Justin (17-Mar-2009 05:56)

Many people report problems compiling PHP on Leopard due to a libiconv issue.

This may be due to the small C test programme in ./configure.
It calls open_conv with two const * char arguments (correct), but these are NOT valid charsets to iconv. This then breaks ./configure.

AFAIK from the libiconv documentation, the PHP configure call is incorrect: this function expects two valid charset arguments. (You can see a list of valid arguments by running iconv -l).

Changing the call to:

cd = open_conv("UTF-8","ISO-8859-1")

returns a valid iconv_t number (non-negative), and configure can then continue setting up for your Makefile compile.