# Right-to-Left Override (U+202E)

The right-to-left override (U+202E) reverses text direction. See how it spoofs filenames and hides code in Trojan Source attacks, and how to remove it.

| Property | Value |
| --- | --- |
| Codepoint | `U+202E` |
| Decimal | `8238` |
| HTML entity | `&#8238;` |
| CSS escape | `\202E` |
| JavaScript escape | `\u202E` |
| URL encoding | `%E2%80%AE` |
| UTF-8 hex | `E2 80 AE` |
| Unicode category | Format (Cf) |
| Unicode block | General Punctuation |

The Right-to-Left Override (U+202E) is an invisible formatting character with a single instruction: **display everything after me in right-to-left order.** It has no visible glyph, and it drives a whole class of spoofing and code-injection attacks.

Unicode's bidirectional (bidi) control characters let left-to-right scripts like English and right-to-left scripts like Arabic and Hebrew share a line. This one *overrides* direction instead of hinting at it, and legitimate uses are rare.

## How It Is Abused

### Filename spoofing

An attacker puts U+202E in a file name so the extension looks different from what it is. A file really named `photo_gpj.exe` can display as `photo_exe.jpg` once the override reverses the characters after it. The victim sees an image and double-clicks an executable.

### Trojan Source (code attacks)

In 2021, Cambridge researchers Nicholas Boucher and Ross Anderson showed (CVE-2021-42574) that bidi overrides and isolates can make source code **read one way to a human and compile another way.** A comment or string containing U+202E (or other bidi controls such as U+2066-U+2069) can reorder code on screen so a reviewer sees safe logic while the compiler runs something else, such as an early `return` or a permission check hidden in what looks like a comment. It works in most programming languages because it lives in the text encoding, not the language.

### Chat, usernames, and moderation evasion

The override is also used to scramble display names, slip past text filters, and make messages render in confusing ways.

## How to Detect and Remove It

The override is invisible and survives copy-paste, so it travels anywhere text goes: file names, commit messages, package names, user input. Any system that shows untrusted text to people (a code reviewer, a file browser, a moderation queue) should surface it.

Paste suspicious text, a file name, or code into the [Invisible Character Viewer](/) on the homepage. It highlights the override and every other hidden formatting character, with the code point on hover.

In code:

```js
// JavaScript: detect
text.includes('‮')

// Remove the override (and other bidi controls)
text.replace(/[‪-‮⁦-⁩]/g, '')
```

```python
# Python: flag any bidirectional control character
import re
if re.search('[‪-‮⁦-⁩]', text):
    raise ValueError("Bidirectional control character detected")
```

For security-sensitive systems such as code review tools, file uploads, and user names, **reject or visibly flag** input containing bidi control characters rather than silently stripping them.

## Technical Details

| Property | Value |
|----------|-------|
| Code point | U+202E |
| Decimal | 8238 |
| UTF-8 | E2 80 AE |
| HTML | `&#8238;` or `&#x202E;` |
| Category | Format (Cf) |
| Block | General Punctuation |

## The Bidi Control Characters

The Right-to-Left Override is one of several bidi formatting characters. Security tooling should treat the whole group as suspicious:

| Character | Code point | Effect |
|-----------|-----------|--------|
| [Left-to-Right Mark](/characters/left-to-right-mark) | U+200E | Invisible strong LTR character (implicit mark) |
| Right-to-Left Mark | U+200F | Invisible strong RTL character (implicit mark) |
| Left-to-Right Override | U+202D | Forces LTR |
| Right-to-Left Override (this page) | U+202E | Forces RTL |
| First Strong Isolate | U+2068 | Isolates direction by first strong char |
| Pop Directional Formatting | U+202C | Ends the most recent override/embedding |

## Frequently Asked Questions

### What does the Right-to-Left Override do?

The Right-to-Left Override (U+202E) is an invisible formatting character that forces the text after it to display right-to-left, regardless of the characters' natural direction. It has no visible glyph but silently reverses how the following text renders.

### Why is U+202E a security risk?

It changes how text looks without changing the underlying bytes. Attackers use it to disguise file names (making "photo_gpj.exe" appear as "photo_exe.jpg") and to hide logic in source code. In this "Trojan Source" attack, code reads one way to a reviewer but compiles differently.

### How do I detect a Right-to-Left Override character?

Paste the suspicious text or file name into the Invisible Character Viewer on the homepage; it highlights U+202E and other hidden formatting characters. In code, check with: text.includes('\u202E').

### How do I remove the Right-to-Left Override?

Paste your text into the remove box near the top of this page, or use "Strip Invisible Characters" in the viewer on the homepage to clear every hidden character. In code: text.replace(/\u202E/g, ''). For security-sensitive systems, reject or flag any input containing bidirectional control characters.

## Related Characters

- [Left-to-Right Mark (U+200E)](https://invisiblecharacterviewer.com/characters/left-to-right-mark)
- [Byte Order Mark (U+FEFF)](https://invisiblecharacterviewer.com/characters/byte-order-mark)
- [Zero-Width Space (U+200B)](https://invisiblecharacterviewer.com/characters/zero-width-space)
- [Word Joiner (U+2060)](https://invisiblecharacterviewer.com/characters/word-joiner)
- [Object Replacement Character (U+FFFC)](https://invisiblecharacterviewer.com/characters/object-replacement-character)

---

Canonical URL: https://invisiblecharacterviewer.com/characters/right-to-left-override
Markdown URL: https://invisiblecharacterviewer.com/characters/right-to-left-override.md
Agent instructions: https://invisiblecharacterviewer.com/llms.txt
