在波斯语SQLite数据库 [英] sqlite database in persian language
问题描述
我想从一个CSV文件中创建一个SQLite数据库。我这样做是因为它是说在这个页面:使用自己的源码分贝的Android 这个:导入CSV SQLite的
但问题是,当表包含在波斯语/阿拉伯语数据。 SQLite的显示为_这个角色。 我该怎么办?
PS。我想用这个数据库在Android项目。
编辑: 我导入CSV使用这个code SQLite的:
CREATE TABLEandroid_metadata(区域设置TEXT DEFAULTEN_US');
CREATE TABLE地址(_ ID整数PRIMARY KEY,
nametext,意文);
。分隔器 ,
.IMPORT test.csv MYDB
SQLite支持UTF-8,UTF-16,这是相当足够存储阿拉伯语或波斯语。
最可能的是你_,因为导入工具需要不同的字符集比原始文件的字符集。
I tried to create a sqlite database from a csv file. I did it as it is said in this page : using your own sqlite db in android and this : import csv to sqlite
but the problem is when the table contains data in farsi/arabic language. sqlite shows that character as "_". what should I do?
PS. I want to use this DB in an android project.
edit: I import csv to sqlite using this code:
CREATE TABLE "android_metadata"("locale" TEXT DEFAULT 'en_US');
CREATE TABLE "addresses"(_id integer PRIMARY KEY,
nametext, meaning text);
.separator ","
.import test.csv mydb
sqlite supports UTF-8, UTF-16 and this is quite enough to store arabic or persian.
Most probably you get "_" because the import tool expects different charset than the charset of your original file.
这篇关于在波斯语SQLite数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!