How to treat words with and without accents as equivalent in AppZard?

I want to treat words with and without accents the same way, as for search purposes, the words should be equivalent. How to do it?

Which words are you talking about ?

I use appzard to make apps in Portuguese. Word examples would be:

álcool, mão, criança, ré.

I would like that, when searching, these words would be interpreted by the application. Written with or without special characters.

The best way is for you to create a rule that if the word has a strange character, it will be changed to a normal letter.

You can try running matching the words for example Ă lcool and alcool have five characters matching means 83% match here you can show the result

I would like a solution like this, used in JavaScript.
“The normalize function uses the normalize method of JavaScript, which is part of the Unicode standard, to remove accents and other special character modifiers. The replace method is then used to replace all characters between \u0300 and \u036f (which include several accents and diacritical symbols) with an empty string, resulting in a normalized string without accents.”

So, You want to convert this text to this ?

alcool, mao, crianca, re

Yes, but these words are just examples. There are many words, it wouldn’t be possible to do one at a time. The solution to the problem is to focus on special characters. But I still don’t know how to do it.

We have created an extension. Can you test it ? :grinning:. This will latinize the text.

blocks - 2023-02-09T112648.841

com.appzard.LatiniseText.aix (13.5 KB)

How amazing. Thank you very much!

1 Like