drift icon indicating copy to clipboard operation
drift copied to clipboard

String filter function contains() from manager class not fully working if the text is in Cyrillic

Open mnkhtrbukhbold opened this issue 2 months ago • 3 comments

names = await _db.managers.names.filter((f) => f.name.contains(query)).get();

This code does not work reliably when the name column contains Cyrillic characters (other non-Latin scripts were not tested). The search may match the first character correctly, but fails on subsequent characters. This issue does not occur with Latin text.

In contrast, the following query works correctly for both Latin and Cyrillic characters:

names = await (_db.select(_db.names)..where((x) => x.name.like('%$query%'))).get();

mnkhtrbukhbold avatar Nov 10 '25 08:11 mnkhtrbukhbold