Sqlite数据库是否支持波斯/阿拉伯数字编码? [英] Does Sqlite database support persian/arabic encoding?

查看:201
本文介绍了Sqlite数据库是否支持波斯/阿拉伯数字编码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在C#中使用Sqlite数据库,我有这个问题:Sqlite数据库是否支持波斯语/阿拉伯语编码?因为我已经写了一些阿拉伯语/波斯数据,当我想从数据库读取数据时,它读取不合适的形式!!!



我的代码:

  int len = ds.Tables [tbl]。Rows.Count; 
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);

谢谢。



下一个代码:

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


解决方案

只要你使用版本3 或更高版本,您将能够使用UTF-8 / UTF-16,这是您最好的选择对于阿拉伯语。


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!!!

my code :

int len = ds.Tables["tbl"].Rows.Count;
            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.

这篇关于Sqlite数据库是否支持波斯/阿拉伯数字编码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆