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