Skip to content

fix: make SQLite searches Unicode case-insensitive - #1078

Open
romasku wants to merge 1 commit into
Donkie:masterfrom
romasku:fix/sqlite-unicode-search
Open

fix: make SQLite searches Unicode case-insensitive#1078
romasku wants to merge 1 commit into
Donkie:masterfrom
romasku:fix/sqlite-unicode-search

Conversation

@romasku

@romasku romasku commented Aug 14, 2026

Copy link
Copy Markdown

SQLite's built-in lower() only handles ASCII. SQLAlchemy implements ilike() on SQLite using lower(), so lowercase Ukrainian queries (and more generally, non-ASCII Unicode) did not match names beginning with uppercase Ukrainian. In full-text search, this meant черв could miss Червоний.

Here I register a Unicode-aware lower() implementation on every aiosqlite connection, and add a separate integration case that stores Червоний and searches for its lowercase form.

Disclaimer: AI-assisted

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant