SQLite reading Chinese garbled (C #)

Source: Internet
Author: User
Tags sqlite database

C # Read some C + + created by the SQLite database garbled, C + + Save DB is encoded with GB2312, C # calls the official System.Data.SQLite is UTF-8 encoded, will be garbled when reading, A system.data.sqlite with a GB2312 code is OK.

Can download SQLite source code to modify the recompile DLL

Modify SQliteConvert.cs line52
private static Encoding _utf8 = new UTF8Encoding ();
private static Encoding _utf8 = System.Text.Encoding.GetEncoding ("GB2312");

ADO 2.0 Provider for SQLite 1.0.66.0

There are fewer mergebin.exe in the 1.066.0, in the old version of 1.0.61.0. VS2008 Download

Have compiled a DLL to read the GB2312 database (download), extracted after the selection of the appropriate DLL, renamed to System.Data.SQLite.dll re-use.

Reference:

1.http://blog.sina.com.cn/s/blog_63edfc900100snvw.html

2.vs2008 C # uses System.Data.SQLite.dll character encoding issues
Http://topic.csdn.net/u/20090601/11/9edb203e-ae0e-41d8-b21f-cd6147f31408.html
3.vs2008 how to compile the full System.Data.SQLite.dll
Http://topic.csdn.net/u/20090603/09/2236072b-da66-459b-b175-fc4676fe984f.html

SQLite reading Chinese garbled (C #)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.