分享

写回答

发帖

[提问] 网站乱码问题

GoDaddy GoDaddy 1606 人阅读 | 11 人回复

发表于 2011-4-26 09:42:27 | 显示全部楼层 |阅读模式

我的网站乱码(ASP+SQL),在本地正常,在GODADDY上乱码,排除了程序问题,需要修改数据库

看了论坛里说的加N也不行,昨天找到说改数据库的属性就可以

我修改属性提示5011错误,没有权限。联系了GODADDY,对方回复,帮忙看下
————————————————————————————————————
Dear Jason,

Thank you for your reply.  Collation controls the way string values are sorted. The default collation sorts alphabetically using the standard Latin character set. Other collations will sort in different orders. For example, a traditional Spanish collation places words beginning with "ch" at the end of a list of words beginning with "c."

It is not necessary to change the default collation to use non-Latin characters. All shared MS SQL databases support Unicode characters, allowing the storage of a variety of alphabets.


Modifying collation settings is an advanced database task and should only be performed by experienced database developers. If you determine it is necessary to change your collation, we recommend modifying it at the table or column level. Making this change at the database level disables some Hosting Control Center functionality, including the installation and removal of ASP Schema objects. Modifying at the table or column level avoids the majority of known compatibility issues with non-standard collation settings.


The following T-SQL sample illustrates how to set the collation at the column level:



CREATE TABLE [dbo].[CollationTest](
[keyColumn] [bigint] NULL,
[strColumn] [varchar](max) COLLATE Traditional_Spanish_CI_AI NULL
) ON [PRIMARY]



Please let us know if we can assist you in any other way.

Best Regards,
Thad P.
Online Support Representative

回答|共 11 个

lwbo1987

发表于 2011-4-26 09:53:17 | 显示全部楼层

godaddy回复的是没有必要修改这些属性,如果你需要修改,他们可以修改,并且给了一个简单的例子,就是上面的
CREATE TABLE [dbo].[CollationTest](
[keyColumn] [bigint] NULL,
[strColumn] [varchar](max) COLLATE Traditional_Spanish_CI_AI NULL
) ON [PRIMARY]

binssen

发表于 2011-4-26 16:55:38 | 显示全部楼层

但是我的数据库是“varchar”没错的
01.JPG

lpj

发表于 2011-4-26 17:03:30 | 显示全部楼层

参考空间乱码问题
不一定是你的数据类型问题
也许是在调用数据时编码转换造成的

lwbo1987

发表于 2011-4-26 17:03:35 | 显示全部楼层

没看明白,是不是数据库插入乱码,可以参考GoDaddy主机空间乱码解决办法

binssen

发表于 2011-4-27 10:34:54 | 显示全部楼层

GODADDY又发了邮件,彻底把我搞晕了,谁帮忙看下,什么表本身的中文

Dear Jason,

You do not have permissions on shared hosting to change the language for the entire database, only tables. You may only use Chinese characters within the tables themselves.

Please let us know if you have any further questions, comments, or concerns by replying to this email. Our service departments and telephone lines are open 24 hours a day, 365 days a year to accommodate your needs anytime.

Sincerely,

Amber P.
Online Support Team

lwbo1987

发表于 2011-4-27 10:37:53 | 显示全部楼层

回复 6# 的帖子

意思说你没有权限改变整个数据库的语言,只能改变自身表的编码

binssen

发表于 2011-4-27 10:42:19 | 显示全部楼层

另外还有一个问题我一直很奇怪,我本地的数据库中文都是正常的,用“Database Publishing Wizard”把本地的数据上传到GODADDY的数据库后就变成了“????”

为什么会这样,我把GODADDY的SQL删除重建也是一样,我本地的数据库也重建了,还是一样
我哭死啊,公司老板们催死我了
555
哪位大大帮忙解决下啊,给钱也行

lwbo1987

发表于 2011-4-27 10:45:07 | 显示全部楼层

回复 8# 的帖子

就是数据库编码的问题

binssen

发表于 2011-4-27 11:03:52 | 显示全部楼层

我连接GODADDY上传资料是出现一个提示,是不是这个问题
- 连接到 Web 服务 (成功)
源数据库排序规则(Chinese_PRC_CI_AS)与目标数据库排序规则(SQL_Latin1_General_CP1_CI_AS)不匹配。在发布不显式指定排序规则的对象时,此不匹配可能会导致错误。

是不是我本地数据库排序规则要改成,(SQL_Latin1_General_CP1_CI_AS)
您需要登录后才可以回帖 登录 | 注册

本版积分规则