(PHP 4 >= 4.0.5, PHP 5, PHP 7, PHP 8)
iconv_set_encoding — 為字符編碼轉換設定當前設置
$type
, string $charset
): bool
將 type
設置的值從內部配置變量更改為 charset
。
type
type
的值可以是以下其中任意一個(gè):
charset
字符集。
成功時(shí)返回 true
, 或者在失敗時(shí)返回 false
。
示例 #1 iconv_set_encoding() 例子
<?php
iconv_set_encoding("internal_encoding", "UTF-8");
iconv_set_encoding("output_encoding", "ISO-8859-1");
?>