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

标签 php utf-8 mbstring ini-set

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

这在 php 文件的开头代表什么以及它的用途是什么?

我知道有一本 php 手册,但它没有用普通人的语言进行解释。

最佳答案

它将默认的内部字符编码定义为UTF-8字符集类型。

这用于通过更改 mbstring.internal_encoding 值来使网站成为多语言网站。

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.

UTF-8(8位Unicode转换格式)是Unicode的可变长度字符编码。

您可以使用 iso-8859-1UTF-8 等更改它。

这里是 Unicode character list 的列表.

关于php - ini_set ('mbstring.internal_encoding' ,'UTF-8' ),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17919441/

相关文章:

php - CentOS安装php-mbstring报错

PHP: mb_strtoupper 不工作

php - Android:无法从 mysql 数据库检索图像 url 并将其显示在 imageView 中

php - 使用 SQL Join 获取所有字段

javascript - 为什么浏览器对电子邮件验证正则表达式显示不同的反斜杠。如何预防呢?

php - 如果我只知道那个文本,如何知道哪个字符集在 MySql 数据库的文本字段中

php - centOS 7 无法安装 php-mbstring 扩展

php - firefox - ajax 需要两次请求相同的数据才能处理

php - 多个SQL查询来选择数据MySql php

php - 错误 '.$row["column_name_here"]。'编码