Understanding Homoglyph Spoofing, Bidi Attacks, and NFKC Normalization
Homoglyphs are characters from different Unicode scripts that look identical or nearly identical to standard Latin letters. For example, Cyrillic small letter "а" (U+0430) and Greek omicron "ο" (U+03BF) look indistinguishable from Latin "a" (U+0061) and "o" (U+006F) in almost every sans-serif font, yet computers treat them as completely different characters.
Attackers exploit homoglyphs for phishing domains (IDN homograph attacks, such as exаmple.com), brand impersonation, and bypassing keyword or plagiarism filters. Similarly, Bidirectional (Bidi) control characters like U+202E (Right-to-Left Override) and U+2066–U+2069 (Bidi Isolates) can visually reorder characters in source code—a supply-chain vulnerability known as Trojan Source (CVE-2021-42574).
At the same time, naive homoglyph cleaners break legitimate multilingual documents by turning real Russian, Ukrainian, or Greek words into broken Latin/Cyrillic hybrids. CleaningAIText uses context-aware mixed-script detection: it only flags and normalizes Cyrillic/Greek lookalikes when they appear inside tokens containing Latin characters ([A-Za-z]), URLs, or email addresses—leaving pure Russian or Greek text untouched, and preserving RTL directional marks adjacent to Arabic or Hebrew scripts.
Combined with JavaScript’s String.prototype.normalize("NFKC") compatibility decomposition—which converts fancy mathematical bold/italic characters and fullwidth ASCII (abc) back into standard characters—and our built-in ASCII-Smuggling Decoder for U+E0000–U+E007F tags, you can audit suspicious URLs, credentials, and source code 100% offline.