Hello,
I'm trying to do a search through a field in the application, it looks for the word in the database (postgres), however, there is a lot of product registered in the database, with and without an accent, for example, coffee and coffee are registered. .
I looked for a solution to ignore the accents and found this solution:
"function('TRANSLATE'," + part + ",'ÀÁÃãáàÉÈéèÍíÓóÒòÕõÚúÇç','AAAaaaEEeeIiOoOoOoUuCc')";
where part is the variable that contains the word that the user searched.
Just have a problem, he solved the following: Now when I write cafe (without accent) it returns everything to me, even with an accent, OK But when I search for coffee (with an accent) it does not return anything to me, either with or without an accent.
Does anyone have an idea?