UTF-8 Encoding Lost?

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for SQLite
Post Reply
MitchV
Posts: 4
Joined: Sat 16 Apr 2011 16:48

UTF-8 Encoding Lost?

Post by MitchV » Sun 22 Jan 2012 18:01

Curious situation here. I'm taking a UTF-8 string in my C# program (received from a 3rd party) and inserting it using a Devart.Data connection to an SQLite database. Oddly, the encoding seems to be lost at that point and when I pull the string back out it is mangled.

I verified the database encoding of the file by connecting and issuing a "PRAGMA encoding;" query - it returned "UTF-8".

Is there anything I should be doing with the connection string? The only encoding mention I see in the documentation is for UTF-16.

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Post by Pinturiccio » Wed 25 Jan 2012 12:02

Do you set UTF16 parameter of ConnectionString to true or to false? What did you mean when said 'the encoding seems to be lost'?

Could you please post here the snippet of code where you create connection, create database and your insert and select commands with parameter definitions, UTF8 text that you insert in database?

A small test project with a DDL\DML scripts will be appreciated.

Post Reply