自 php 5.0.0 起,配备了这个具有多种实用功能的扩展,来帮助您编写多语言脚本。
默认已激活此扩展,但是它能够在编译时通过 --without-iconv 选项被禁用。
选项指令 --with-iconv-dir 用于 php 编译时指定 iconv 在系统里的路径,否则会扫描默认路径。
相关函数:
iconv_get_encoding — 获取 iconv 扩展的内部配置变量
iconv_mime_decode_headers — 一次性解码多个 mime 头字段
iconv_mime_decode — decodes a mime header field
iconv_mime_encode — composes a mime header field
iconv_set_encoding — 为字符编码转换设定当前设置
iconv_strlen — 返回字符串的字符数统计
iconv_strpos — finds position of first occurrence of a needle within a haystack
iconv_strrpos — finds the last occurrence of a needle within a haystack
iconv_substr — 截取字符串的部分
iconv — 字符串按要求的字符编码来转换
ob_iconv_handler — 以输出缓冲处理程序转换字符编码