mb_internal_encoding

(PHP 4 >= 4.0.6, PHP 5, PHP 7)

mb_internal_encoding锟斤拷锟斤拷/锟斤拷取锟节诧拷锟街凤拷锟斤拷锟斤拷

说锟斤拷

mb_internal_encoding ([ string $encoding = mb_internal_encoding() ] ) : mixed

锟斤拷锟斤拷/锟斤拷取锟节诧拷锟街凤拷锟斤拷锟斤拷

锟斤拷锟斤拷

encoding

encoding 锟街凤拷锟斤拷锟斤拷锟斤拷锟斤拷使锟斤拷锟斤拷 HTTP 锟斤拷锟斤拷锟街凤拷锟斤拷锟斤拷转锟斤拷锟斤拷HTTP 锟斤拷锟斤拷址锟斤拷锟斤拷锟阶拷锟斤拷锟絤bstring 模锟斤拷系锟叫猴拷锟斤拷锟街凤拷锟斤拷锟斤拷转锟斤拷锟斤拷默锟较憋拷锟诫。 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锟斤拷锟津返回碉拷前锟斤拷锟街凤拷锟斤拷锟斤拷锟斤拷锟狡★拷

锟斤拷锟斤拷

Example #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