mb_internal_encoding
(PHP 4 >= 4.0.6, PHP 5, PHP 7, PHP 8)
mb_internal_encoding — 設定/獲取內部字元編碼
參數
- 
encoding
- 
      encoding字元編碼名稱使用於 HTTP 輸入字元編碼轉換、HTTP 輸出字元編碼轉換、mbstring 模組系列函式字元編碼轉換的預設編碼。 You should notice that the internal encoding is totally different from the one for multibyte regex.
返回值
   如果設定了 encoding,則成功時返回 true, 或者在失敗時返回 false。
   In this case, the character encoding for multibyte regex is NOT changed.
   如果省略了 encoding,則返回目前的字元編碼名稱。
  
範例
示例 #1 mb_internal_encoding() 例子
<?php
/* 設定內部字元編碼為 UTF-8 */
mb_internal_encoding("UTF-8");
/* 顯示目前的內部字元編碼*/
echo mb_internal_encoding();
?>
參見
- mb_http_input() - 檢測 HTTP 輸入字元編碼
- mb_http_output() - 設定/獲取 HTTP 輸出字元編碼
- mb_detect_order() - 設定/獲取 字元編碼的檢測順序
- mb_regex_encoding() - Set/Get character encoding for multibyte regex