New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support cyrillic for substring search #581

Open
Romadro opened this Issue Nov 19, 2014 · 3 comments

Comments

Projects
None yet
4 participants
@Romadro

Romadro commented Nov 19, 2014

Support cyrillic and maybe some other languages for beginsWith, contains, endsWith functions.

Realm realm = Realm.getInstance(this);
realm.beginTransaction();
Person person = realm.createObject(Person.class);
person.setName("ВЛадимир");
realm.commitTransaction();

RealmResults<Person> results = realm.where(Person.class)
                                    .beginsWith("name", "вл", false)
                                    .findAll(); 

// results.size() returns 0 :(

Sqlite also has the same bug. I am forced to use workaround with additional normalized column for that search functionality

@kneth

This comment has been minimized.

Show comment
Hide comment
@kneth

kneth Nov 19, 2014

Contributor

Java is using modified UTF8, and the core of Realm is using plain UTF8. We are aware of some character sets might have issues when used with Realm. We are in the process of reviewing the string handling in Realm at the moment and we hope that we can handle cyrillic (and others) much better in the next release.

Contributor

kneth commented Nov 19, 2014

Java is using modified UTF8, and the core of Realm is using plain UTF8. We are aware of some character sets might have issues when used with Realm. We are in the process of reviewing the string handling in Realm at the moment and we hope that we can handle cyrillic (and others) much better in the next release.

@kneth kneth added the bug? label Nov 19, 2014

@kneth

This comment has been minimized.

Show comment
Hide comment
@kneth

kneth Nov 19, 2014

Contributor

I haven't studied SQLite close enough so I cannot say why it has the same bug. Realm relies on the underlying operating system - and SQLite probably does too - we have the same issue. Case sensitive matches only work for ASCII characters.

Contributor

kneth commented Nov 19, 2014

I haven't studied SQLite close enough so I cannot say why it has the same bug. Realm relies on the underlying operating system - and SQLite probably does too - we have the same issue. Case sensitive matches only work for ASCII characters.

@bmunkholm

This comment has been minimized.

Show comment
Hide comment
@bmunkholm

bmunkholm Nov 19, 2014

Contributor

And we will document that, so it doesn't come as a surprise.

On Wed, Nov 19, 2014 at 1:25 PM, Kenneth Geisshirt <notifications@github.com

wrote:

I haven't studied SQLite close enough so I cannot say why it has the same
bug. Realm relies on the underlying operating system - and SQLite probably
does too - we have the same issue. Case sensitive matches only work for
ASCII characters.


Reply to this email directly or view it on GitHub
#581 (comment).

Contributor

bmunkholm commented Nov 19, 2014

And we will document that, so it doesn't come as a surprise.

On Wed, Nov 19, 2014 at 1:25 PM, Kenneth Geisshirt <notifications@github.com

wrote:

I haven't studied SQLite close enough so I cannot say why it has the same
bug. Realm relies on the underlying operating system - and SQLite probably
does too - we have the same issue. Case sensitive matches only work for
ASCII characters.


Reply to this email directly or view it on GitHub
#581 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment