close

 

說明

mixed mb_substitute_character ([mixed $substrchar = mb_substitute_character() ] )

當輸入字符的編碼是無效的,或者字符代碼不存在於輸出的字符編碼中時,
可以為其指定一個替代字符。
無效字符可以被替換為 NULL(不輸出)、string 或者 integer 值(Unicode 字符代碼的值)。


參數
substrchar
指定 Unicode 值為一個 integer,或者是以下字符串中的一個:

"none"::不輸出
"long":輸出字符代碼的值(比如:U+3000、JIS+7E7E)
"entity":輸出字符的實體(比如:Ȁ)


<?php
/* 設置為 Unicode U+3013 (GETA MARK) */
mb_substitute_character(0x3013);

/* 設置十六進制格式 */
mb_substitute_character("long");

/* 顯示當前設置 */
echo mb_substitute_character();
?>

arrow
arrow
    全站熱搜

    stockwfj3 發表在 痞客邦 留言(0) 人氣()