I have DictObject
with a text property that contains some Vietnamese letters, such as \"Sống\".
@interface DictObj : RLMObject
@property NSStrin
Realm Objective-C v2.5.0 added support for the diacritic-insensitive modifier on most string operations. All supported string comparison operators except LIKE
now support the [d]
modifier.
Note that there is a performance tradeoff in performing a diacritic-insensitive comparison. If you're doing very frequent lookups it may be preferable to pre-compute a version of the string with the diacritics stripped and store it in a second property on your model. You could then use the diacritic-free property in queries, while continuing to use the original property for display purposes. If you have existing data stored in your Realm, you can add the extra property to your class and populate it for existing objects within a migration.