問題描述
SQL Server 2008:字符編碼 (SQL Server 2008 : Character encoding)
I have 2 separate SQL server instances, one is our testing system and the other is our production system. In the testing system, the value in the field (type: nvarchar(50)) appears like (a) listed below. However, in the Production system it appears like (b) below --
a) Some – character
b) Some – character
I have two questions :-
- What difference in settings of the database/SQL instance would make the same character appear differently?
- Is there a way to find the unicode equivalent of that special character, so I can get a more clear understanding of which language/keyboard this originates from? (This field is populated by a user form, and we have a global team of users)
Thanks.
參考解法
方法 1:
Run this statement on both boxes.
SELECT SERVERPROPERTY('Collation')
It sounds like you have different default Collations on the different servers. If they are different, you'll have to then determine whether you want to/can make them both the same.
This question on ServerFault should give you some guidance if that's the case.
(by Vj_plugs_in、Bert)