开发者

Does Sqlite database support persian/arabic encoding?

I work with Sqlite database in C# and I have this question: Does Sqlite database support Persian/Arabic encoding? Because I have written some Arabic/Persian data in it and when I want to read data from database it is read in unsuitable form!!!

Does Sqlite database support persian/arabic encoding?

my code :

int len = ds.Tables["tbl"].Rows.Cou开发者_开发知识库nt;
            int index = rnd.Next(0, len - 1);
            //notifyIcon1.ShowBalloonTip(15, "پیام عشق ", ds.Tables["tbl"].Rows[index][0].ToString(), ToolTipIcon.Info);
            string str = ds.Tables["tbl"].Rows[index][0].ToString();
            MessageBox.Show(str);

thanks .

next of my code :

DataSet ds;
ds = SQLite_DB.Select_DB(SQLite_DB.Con_string("data.s3db"), "select * from info");


So long as you're using Version 3 or higher, you'll be able to use UTF-8 / UTF-16, which is your best bet for Arabic.


In short: No.

SQLite support only a very, very limited number of encodings: UTF-8 and UTF-16 (multiple varieties).

Fortunately, UTF-8 is perfectly suitable for expressing Arabic or Persian, or any other language (including Klingon, should the fancy grab you).

It is posible, of course, that some other part of your toolchain is bungling the encoding, check the documentation for the C#.net SQLite wrapper, and your Forms code.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜