文字

运行时配置

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

Iconv 配置选项
名字 默认 可修改范围 更新日志
iconv.input_encoding "" PHP_INI_ALL 自 PHP 4.0.5 起有效。在 PHP 5.6.0 中废弃。
iconv.output_encoding "" PHP_INI_ALL 自 PHP 4.0.5 起有效。在 PHP 5.6.0 中废弃。
iconv.internal_encoding "" PHP_INI_ALL 自 PHP 4.0.5 起有效。在 PHP 5.6.0 中废弃。

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

Warning

有些系统(比如 IBM AIX) 使用 "ISO8859-1" 来代替 "ISO-8859-1",所以在配置选项和函数参数中必须使用这个值。

iconv.input_encoding string
Warning

This feature has been DEPRECATED as of PHP 5.6.0. Relying on this feature is highly discouraged.

PHP 5.6 及以上的用户应该留空并以 default_charset 取代。

iconv.output_encoding string
Warning

This feature has been DEPRECATED as of PHP 5.6.0. Relying on this feature is highly discouraged.

PHP 5.6 及以上的用户应该留空并以 default_charset 取代。

iconv.internal_encoding string
Warning

This feature has been DEPRECATED as of PHP 5.6.0. Relying on this feature is highly discouraged.

PHP 5.6 及以上的用户应该留空并以 default_charset 取代。

用户评论:

[#1] Justin [2009-03-17 09:56:04]

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.

上一篇: 下一篇: