Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Searching a SQLite database which contains cyrillic data

I have a problem searching my SQLite database, which contains data written with cyrillic characters. If the key word is also cyrillic, then everything is ok, but if not, then I can`t get the result in my Android application.

Does anyone have an idea how can I implement searching the cyrilic data no matter the charset of the keyword? Thanks

like image 795
user383295 Avatar asked Jul 04 '10 23:07

user383295


People also ask

How do I find data in SQLite?

To Search for the values define edit text and implement text watcher in database enter a query as shown below: editText. addTextChangedListener(new TextWatcher(){ Cursor cusror; cursor=db. rawQuery("SELECT * FROM "+ DB_NAME + " WHERE " + DB_NAME.id + " = " + DB_NAME.Id + " AND " + DB_NAME.

What is wildcard in SQLite?

SQLite provides two wildcards for constructing patterns. They are percent sign % and underscore _ : The percent sign % wildcard matches any sequence of zero or more characters. The underscore _ wildcard matches any single character.

Is SQLite faster than MySQL?

SQLite 2.7. 6 is often faster (sometimes more than twice as fast) than MySQL 3.23. 41 for most common operations. SQLite does not execute CREATE INDEX or DROP TABLE as fast as the other databases.

Is SQLite stored locally?

SQLite is an offline database that is locally stored in the user's device and we do not have to create any connection to connect to this database.


1 Answers

If you use UTF8 encode, There will be no problem.

Actually not. String comparison works only with ascii characters (sort, upper, lower and like). If you are using non-ascii chars you should install plugin, which is like whole SQLite in size. Proof.

If you are interested in cyrillic symbols, try this link.

like image 187
mdv Avatar answered Nov 07 '22 06:11

mdv