开发者

ADO.NET + Sql Server Varchar encoding problem

开发者 https://www.devze.com 2023-01-12 07:20 出处:网络
Put simply, I have a set of special开发者_高级运维 characters in a Sql Server database varchar column, and I want to fetch it from a C# application.

Put simply, I have a set of special开发者_高级运维 characters in a Sql Server database varchar column, and I want to fetch it from a C# application.

Now the difficulty is: using Query Analyzer, I get the desired value of: "·°ï££".

However, through the client application, I end up with: "À░´úú".

It's a varchar column in a database with collation SQL_Latin1_General_CP850_CI_AI. In C#, I'm using default encoding. I'm at a loss - any ideas?


You need the column type changed to NVARCHAR to support unicode.

see a previous post

0

精彩评论

暂无评论...
验证码 换一张
取 消