ThinkSSL🔒 一键申购 5分钟快速签发 30天无理由退款 购买更放心 广告
此模块包含了 iconv 字符集转换功能的接口。 使用此模块,你可以将一个本地字符集表达的字符串转换成另一种字符集,比如可以是 Unicode 字符集。 支持的字符集基于你系统上 iconv 的实现。 注意,在某些系统上 iconv 函数可能无法以你预期的那样工作。 在这种情况下,安装[» GNU libiconv](http://www.gnu.org/software/libiconv/)库将会是个不错的主意。 它最终将会产生更一致的结果。 自PHP5.0.0 起,配备了这个具有多种实用功能的扩展,来帮助您编写多语言脚本。 让我们看看以下章节,来探索新的功能 * [预定义常量](https://www.php.net/manual/zh/iconv.constants.php) * [iconv 函数](https://www.php.net/manual/zh/ref.iconv.php) * [iconv\_get\_encoding](https://www.php.net/manual/zh/function.iconv-get-encoding.php)— 获取 iconv 扩展的内部配置变量 * [iconv\_mime\_decode\_headers](https://www.php.net/manual/zh/function.iconv-mime-decode-headers.php)— 一次性解码多个 MIME 头字段 * [iconv\_mime\_decode](https://www.php.net/manual/zh/function.iconv-mime-decode.php)— 解码一个MIME头字段 * [iconv\_mime\_encode](https://www.php.net/manual/zh/function.iconv-mime-encode.php)— Composes a MIME header field * [iconv\_set\_encoding](https://www.php.net/manual/zh/function.iconv-set-encoding.php)— 为字符编码转换设定当前设置 * [iconv\_strlen](https://www.php.net/manual/zh/function.iconv-strlen.php)— 返回字符串的字符数统计 * [iconv\_strpos](https://www.php.net/manual/zh/function.iconv-strpos.php)— Finds position of first occurrence of a needle within a haystack * [iconv\_strrpos](https://www.php.net/manual/zh/function.iconv-strrpos.php)— Finds the last occurrence of a needle within a haystack * [iconv\_substr](https://www.php.net/manual/zh/function.iconv-substr.php)— 截取字符串的部分 * [iconv](https://www.php.net/manual/zh/function.iconv.php)— 字符串按要求的字符编码来转换 * [ob\_iconv\_handler](https://www.php.net/manual/zh/function.ob-iconv-handler.php)— 以输出缓冲处理程序转换字符编码