惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Simon Willison's Weblog
Simon Willison's Weblog
T
Threatpost
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Spread Privacy
Spread Privacy
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Engineering at Meta
Engineering at Meta
T
Tenable Blog
C
Cisco Blogs
T
The Blog of Author Tim Ferriss
NISL@THU
NISL@THU
T
Threat Research - Cisco Blogs
T
The Exploit Database - CXSecurity.com
P
Privacy & Cybersecurity Law Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
S
Secure Thoughts
N
News and Events Feed by Topic
Google DeepMind News
Google DeepMind News
博客园 - 三生石上(FineUI控件)
Microsoft Azure Blog
Microsoft Azure Blog
月光博客
月光博客
H
Hacker News: Front Page
I
InfoQ
L
LangChain Blog
Security Latest
Security Latest
The Cloudflare Blog
Forbes - Security
Forbes - Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Stack Overflow Blog
Stack Overflow Blog
TaoSecurity Blog
TaoSecurity Blog
量子位
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
V
Visual Studio Blog
Scott Helme
Scott Helme
爱范儿
爱范儿
A
Arctic Wolf
F
Full Disclosure
酷 壳 – CoolShell
酷 壳 – CoolShell
Schneier on Security
Schneier on Security
N
News and Events Feed by Topic
C
CXSECURITY Database RSS Feed - CXSecurity.com
L
LINUX DO - 最新话题
V2EX - 技术
V2EX - 技术
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
人人都是产品经理
人人都是产品经理
The Hacker News
The Hacker News
Hugging Face - Blog
Hugging Face - Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
Know Your Adversary
Know Your Adversary
Application and Cybersecurity Blog
Application and Cybersecurity Blog

博客园 - antistone

GoogleEarth截图技巧(转) Windows 7 中更改用户主目录 C#开发Windows服务入门摘要 WinForm中使用Log4NET C# 中用信号量实现读者写者问题 测试Google文件的发布功能 Linux下OpenGL开发 -- 准备篇 FCKEditor工具条定制 FCKEditor的使用-asp 石头汤的故事 在JAVA中读取文件乱码的解决办法 Struts 内容简介(转) Xvid技术中的精彩部分[转] Marshal GetCurrentImage的MSND说明,暂记 C#中数据类型与其他语言中的数据类型之间的对应关系 神州数码网络无线校园网整体解决方案及特点 关于web应用程序安全的思考(序)(转) NHibernate快速指南
Sybase ASE ADO.NET驱动 乱码问题解决
antistone · 2008-05-20 · via 博客园 - antistone

  
  用Sybase的Ado.NET驱动进行数据库连接的时候,有时候会出现中文乱码的情况。而OLEDB的驱动就一点问题都没有。可见Ado.NET的驱动还需要进一步完善啊..
  Sybase的默认的安装字符集选了ISO_1,结果装好数据库以后,发现在SQL Advantage里面执行SELECT语句,查询的结果里面中文内容正常!用c#写的代码读出的中文内容,乱码。
  通过查资料,得到的解决办法就是:安装CP936字符集!

  处理步骤:  (假设安装目录是c:\sybase)

  1:cmd命令行状态下:  
   1. c:\>cd \sybase\charsets\cp936
   2. c:\sybase\charsets\cp936> charset -Usa -P -S binary.srt cp936 
         

   2:在SQL Advantage中
          1>select id from syscharsets where name='cp936'
          2>go 
    把选择出来的id(我得出来的是171,网上好多人得到的也是171,如果你的不是171,就用你选择出来的值)然后:
    1>sp_configure "default character set id",171

   3:重启Sybase服务器。需要重启两次。第一次重启后会直接停止,需要启动第二次。或者:重新启动机器。 
   经过这些设定以后,乱码问题就解决了。