A diacritic also called a diacritic or diacritical mark, point, or sign, is a small sign added to a letter to alter pronunciation or to distinguish between similar words. In codiing we often come across them while reading input from webpages.
There might be some API's available to handle the task, but we are choosing hard way to do that to save time to explore them and then test them. We need to perform the following steps in order to find and replace them with similar sounding words.
xxd index.html?IP=192.42.43.22 | grep Neuch |
0001d00: 6c64 223e 4e65 7563 68e2 7465 6c3c 2f74 ld">Neuch?tel</t |
if($city =~ m/\xe2/){ $city =\~ s/\xe2/a/g; } |