加入收藏 | 设为首页 | 会员中心 | 我要投稿 温州站长网 (https://www.0577zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 服务器 > 搭建环境 > Linux > 正文

linux修改字符串编码为gb

发布时间:2022-10-14 18:00:16 所属栏目:Linux 来源:网络
导读: Apache中决定服务器编码的httpd.conf中AddDefaultCharset决定的,,我设置为AddDefaultCharset utf-8,所以服务器默认是utf-8的;AddDefaultCharset utf-8上面有一段注释:
# Specify a de

Apache中决定服务器编码的httpd.conf中AddDefaultCharset决定的,,我设置为AddDefaultCharset utf-8,所以服务器默认是utf-8的;AddDefaultCharset utf-8上面有一段注释:

# Specify a default charset for all content served; this enables

# interpretation of all content as UTF-8 by default. To use the

# default browser choice (ISO-8859-1), or to allow the META tags

# in HTML content to override this choice, comment out this

# directive:

大概意思是:指定一个默认的字符集传送内容;这将所有内容默认以utf-8编码解析。如果要使用浏览器默认选择(ISO-8859-1),或允许使用HTML的META来自动选择浏览器编码,注释掉这行即可。

那就是改为 # AddDefaultCharset utf-8,这样此行不再起作用linux编码,浏览器将根据网页的META来选择字符编码,apache就可以支持多字符编码了。

(编辑:温州站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!