Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

要制作多语言的网站,就一定要。。。

[复制链接]
康盛老板就是我 发表于 2010-7-23 21:30:23 | 显示全部楼层 |阅读模式
使用utf8的吗?其他编码不行吗?
dongjianhua 发表于 2010-7-24 11:47:18 | 显示全部楼层
是的 如果是使用gbk的话 其他语言的编码就不好处理了
回复

使用道具 举报

 楼主| 康盛老板就是我 发表于 2010-7-24 23:57:11 | 显示全部楼层
回复 dongjianhua 的帖子


    为什么每次使用utf8 的时候,网页显示的中文有一部分是乱码或者“?”的符号或者是小框框之类的,严重影响网友的使用。谢谢解答
回复

使用道具 举报

 楼主| 康盛老板就是我 发表于 2010-7-26 19:38:27 | 显示全部楼层
帮帮忙回答
回复

使用道具 举报

vot 发表于 2010-7-26 21:51:51 | 显示全部楼层
本帖最后由 vot 于 2010-7-26 21:53 编辑
使用utf8的吗?其他编码不行吗?
康盛老板就是我 发表于 2010-7-23 21:30

If you use a single language system, you can use ANY encoding as you wish.
You just have to set appropriate encoding in a database, in language files, and in http-header.
That's all!

But if you want to use more than one language at the same time - you MUST use UTF-8 encoding everywhere.


回复

使用道具 举报

 楼主| 康盛老板就是我 发表于 2010-7-26 23:28:05 | 显示全部楼层
回复 vot 的帖子


    This understanding, however, when every time I use utf8, pages often severe garbled, why? How to solve? Software on the server or configuration problem?
回复

使用道具 举报

vot 发表于 2010-7-27 02:39:41 | 显示全部楼层
回复


    This understanding, however, when every time I use utf8, pages often severe garbled,  ...
康盛老板就是我 发表于 2010-7-26 23:28


The content is garbled because of the software does not send a http header with a proper encoding, so your browser often do not know how to decode this content.
You have to:
1) Check the configuration if enabled to force encoding in http-header. (For example, UCHome has such setting in admin-center settings)
In discuzX1 see the next setting, enabling the http header encoding:
$_config['output']['forceheader'] = 1; // 1=Enable, 0=Disable

2) If there is no possibility to turn on such setting, you can add yourself a PHP command into your soft to force required encoding. For example, you can use this PHP instruction:
header("Content-Type: text/html; charset=utf-8");

回复

使用道具 举报

 楼主| 康盛老板就是我 发表于 2010-7-27 20:33:19 | 显示全部楼层
回复 vot 的帖子


    I'm use the ECMALL.
回复

使用道具 举报

tzxiaolang 发表于 2010-8-1 22:41:45 | 显示全部楼层
楼主,你是康盛的老板,你还要在这问啊。。。。
回复

使用道具 举报

44241117 发表于 2011-11-29 02:09:54 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-5-19 11:09 , Processed in 0.109702 second(s), 16 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表