Home / Guides / Look-alike letters: when a Cyrillic or Greek character stands in for a Latin one

Look-alike letters: when a Cyrillic or Greek character stands in for a Latin one

In short

A homoglyph is a character that looks the same as another but has a different code, such as the Cyrillic letter that looks exactly like a Latin a. It breaks searches, spell checking and links. Replace them inside otherwise-Latin words and leave genuine Cyrillic or Greek text alone.

Look closely at two words that appear identical, and your computer may still treat them as different. One of the letters can belong to another alphabet entirely, and nothing on screen tells you which one it is.

What a homoglyph is

Every character in Unicode has its own code, even when two characters look the same. The Latin lowercase a is U+0061. The Cyrillic lowercase a is U+0430. They are drawn almost identically in most fonts, but to a computer they are as different as a and z.

Several other pairs behave the same way. Cyrillic e (U+0435), o (U+043E), p (U+0440), c (U+0441) and x (U+0445) all resemble Latin letters, as does the Greek omicron (U+03BF) and its capital forms. A word typed with one of these mixed in looks perfectly normal.

How they end up in your text

  • Typing on a keyboard layout that switches between Latin and Cyrillic, where one letter is entered from the wrong layout.
  • Copying from web pages, scanned documents or OCR output that confused similar shapes.
  • Copying from sources that mixed scripts, such as bilingual material or names transliterated by hand.
  • Occasionally on purpose, for example to get around a filter or to make a fake web address look real.

What they break

  • Search and find-and-replace. Searching for a word does not find the copy that has one foreign letter in it.
  • Spell checking. A correct-looking word gets a red underline, and you can't see why.
  • Sorting and matching. A name with a look-alike letter sorts in the wrong place or fails to match its twin in a spreadsheet or database.
  • Links and addresses. A web address containing a look-alike letter points somewhere different from the one it appears to name.
  • Code and identifiers. A variable or file name that looks right can be a different name, which leads to errors that are very hard to spot by eye.

The security side

Look-alike characters have been used in what are called homograph attacks, where a web address uses characters from another alphabet to imitate a well-known domain. Browsers have rules that display suspicious mixed-script addresses in their raw form, which starts with xn--, instead of as readable text.

The sensible habit is to type a web address yourself rather than trusting a link in a message, and to treat any unexpected spell-check underline on a name you know as a reason to look again.

How to spot them

A red underline on a word that looks right is the most common clue. A failed search for a word you can see is the second. If you work with code, a regular expression using a script property, such as \p{Script=Cyrillic} in an editor that supports it, will highlight every Cyrillic character in a file. In Python, the unicodedata module will tell you the name of any character, which turns a mystery into a one-line answer.

The quickest route for ordinary text is to paste it into a cleaner that reports what it finds. In Paste & Wash, the report lists each look-alike letter with its code, so you can see exactly what was swapped.

How Paste & Wash treats them

The Look-alike letters option is on by default. It replaces Cyrillic and Greek look-alikes with their Latin twins, but only inside a word that also contains a genuine Latin letter. That rule is deliberate: a word made entirely of Cyrillic or Greek letters is simply text in that language, so it is left exactly as it was.

This means the option is safe for people who write in more than one alphabet. A Russian sentence stays Russian, and a Latin word with one stray Cyrillic letter is repaired. The option exists to fix accidental mix-ups and to protect you from them, not to change how real text in another script looks.

Preventing it

  • Check which keyboard layout is active before you type, especially if you use more than one.
  • Run important text, such as names, addresses and anything going into a database, through a cleaner once.
  • Copy web addresses and identifiers from a trusted source, not from a message you didn't expect.

A worked example

Imagine a customer list where one company name was typed with a Cyrillic e and a Cyrillic a in place of the Latin letters. It looks correct, but a search for the name in your spreadsheet skips that row, and a duplicate check treats it as a different company.

Run through the cleaner, the report names the swap and the code of each character replaced, so you can see exactly what changed. After cleaning, the entry matches the others and the search finds it.

Is a look-alike letter always a mistake? Not always. In bilingual writing or wordplay a mixed-script word can be deliberate. That is rare in everyday prose, and you can switch the option off if you need to keep it.

Try the cleaner to see what is hiding in your own text.

Related guides

Browse all 20 guides