ini_set('mbstring.internal_encoding','UTF-8')

余生颓废 提交于 2019-12-11 00:17:20

问题


ini_set('mbstring.internal_encoding','UTF-8')

what does this signify at the beginning of a php file and what is it used for ?

I know that a php manual exists but it does not explain it in plain common man's language.


回答1:


It defines the default internal character encoding to UTF-8 character set type.

This is used to make a site multilingual by changing the mbstring.internal_encoding value.

encoding is the character encoding name used for the HTTP input character encoding conversion, HTTP output character encoding conversion, and the default character encoding for string functions defined by the mbstring module. You should notice that the internal encoding is totally different from the one for multibyte regex.

And UTF-8 (8-bit Unicode Transformation Format) is a variable-length character encoding for Unicode.

You can change it using the iso-8859-1, UTF-8, etc.

Here is the list of Unicode character list.



来源:https://stackoverflow.com/questions/17919441/ini-setmbstring-internal-encoding-utf-8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!