Page 1 of 1

UTF-8 Encoding Lost?

Posted: Sun 22 Jan 2012 18:01
by MitchV
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.

Posted: Wed 25 Jan 2012 12:02
by Pinturiccio
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.