Chinese garbled solve SQL Server 2005

If the SQL Server 2005 collation system is "Chinese_PRC_CI_AS", then the database fields and database collation default to "Chinese_PRC_CI_AS", if the field is varchar, insert Chinese is not in question.

If the SQL Server 2005 collation system is "SQL_Latin1_General_CP1_CI_AS", then the database fields and database collation default to "SQL_Latin1_General_CP1_CI_AS", if the field is varchar, insert Chinese, the database is displayed as "?????", and the data can not be repaired. Solution is as follows:

1. Modify the field collation is "Chinese_PRC_CI_AS", varchar change nvarchar, SQL insert statement, the former Chinese characters plus "N", can be inserted into Chinese characters.
2. Modify the database collation is "Chinese_PRC_CI_AS", field remains varchar, SQL statements unchanged, insert the Chinese fail to see the field properties found field collation virtually no change, or the default is "SQL_Latin1_General_CP1_CI_AS", and then modify the field collation, varchar unchanged, SQL unchanged, you can insert Chinese characters.

Summary:
1. Collation changes to the system have not tried.
2. Modify the database collation will not put the collation of the fields in the database to get rid of, but in order to display Chinese, the database collation must be changed.
3. Simply modifying the collation field, we can not completely solve the problem.


end

Guess you like

Origin blog.csdn.net/logan676/article/details/23436823
Recommended