All rules

Look-alike character

lookalike-characteron by defaultJapanese / English

A character that looks like an ordinary one but is a different one

Example

Flagged
Send the form to the café office.
What chaff prints
1:25 "é" is a letter and a separate mark (U+0065 U+0301), not the single letter "é"
Fixed
Send the form to the café office.
What chaff prints
no finding

How to fix

Delete the character and type the ordinary one. Normalising the document to NFC also fixes it (NFKC for radicals).

Why it matters

A Kangxi radical (⼈ U+2F08) looks like the ordinary 人 and is another character; so is a CJK compatibility ideograph. A letter written as a base and a separate combining mark (e + U+0301, common in macOS file names and text copied from them) looks like é and is another sequence. Search, sorting, dictionaries and spelling checks all miss them, and the reader cannot see what to fix. They come from PDF copies and input methods. Code is checked too.

What it does not flag

Combinations with no single precomposed form (a variation selector after a character, an accent with no precomposed letter) and compatibility ideographs that Unicode keeps as their own characters (﨑) are not reported.

Turning it off or relaxing it

Silence this one spot (in the document)
<!-- stet: lookalike-character — reason -->
Relax it for the team (the reason is kept as a comment in chaff.yaml)
npx chaffjs relax lookalike-character --why "reason"
Turn it off for the team (chaff.yaml)
rules: lookalike-character: off
Technical details
Layer
L1
Status
stable
Severity
warning
Languages
Japanese and English
Suited to
business, technical, blog, legal, docs, academic, literature, speech

Levels

Set a level for this rule under rules in chaff.yaml. With nothing set, it runs at the level its genre gives it (see By genre below).

stricterror
normalwarning
relaxedinfo

This rule has no limit to count to. A level sets how a finding is marked: relaxed keeps the finding and marks it a step lower.

By genre

Runs by default in
technical/spec, technical/readme, blog/tech, blog/essay, blog/owned-media, business/proposal, business/report, business/email, business/press-release, business/meeting-notes, legal/contract, legal/statute, legal/judgment, legal/patent, docs/manual, docs/faq, docs/glossary, academic/paper, literature/fiction, literature/essay, literature/poetry, literature/play, speech/address, speech/transcript

Genres

Message

"{written}" ({code}) looks like "{usual}" but is another character

"{written}" ({code}) is a radical, not the ordinary "{usual}"

"{written}" ({code}) is a compatibility ideograph, not the ordinary "{usual}"

"{written}" is a letter and a separate mark ({code}), not the single letter "{usual}"

"{written}" writes the voicing mark as a separate character ({code}), not the single letter "{usual}"

Rewrite depth (chaff fix-plan --depth): light — words and sentences; the structure and the voice stay

Sources

This page is built from the rule's definition file:packages/chaff/rules/lookalike-character.yaml