Issue
I have a text like "Previously" which looks English but has a non-ASCII characters in it:
src="https://i.stack.imgur.com/w0euX.png" alt="enter image description here">
What would be the easiest way to convert it to English text (so that "P" would be a latin capital letter P, for example) ?
For simplicity, let's assume that the non-English characters are Russian. But, a more general solution will be much appreciated!
Preferable languages: Javascript, Ruby, Bash script.
Solution
Although some Cyrillic (and Greek) letters are identical with some Latin letters in graphic appearance (i.e., there is probably no difference in any font that contains both), there is no formal mapping defined between them. Thus, you would need to define the mapping yourself. For Russian, there is a rather limited number of such letters, so it would be a matter of a small mapping table. But if you wish to cover all of Unicode, there is a large numer of lookalikes and almost lookalikes, so the hard part would be to decide which characters are similar enough.
Answered By - Jukka K. Korpela Answer Checked By - Senaida (WPSolving Volunteer)