I'm trying to slug a dice, I tried to use the lower and replace to change some characters, my query looks like this:
return Person.query.get(person_id).name.filter(func.lower(func.replace(Person.name, "ç", "c"))
It works, but if I get something like 'á'
, or some other special character, it obviously breaks.
What is the way around this, make a list with all characters with the index to give a replace? something like this?