Files
eventlens/backend/app/providers/utils.py
T
2026-04-17 16:39:13 +02:00

17 lines
409 B
Python

import unicodedata
def normalize_search_text(value: str | None) -> str:
if not value:
return ""
value = (
value.casefold()
.replace("ä", "ae")
.replace("ö", "oe")
.replace("ü", "ue")
.replace("ß", "ss")
)
normalized = unicodedata.normalize("NFKD", value)
return "".join(char for char in normalized if not unicodedata.combining(char))