Full-width and half-width letters and digits are mixed
fullwidth-alnum-consistencyon by default (info)Japanese
Letters and digits both full-width (ABC123) and half-width (ABC123)
Example
How to fix
Match the way the rest of the document does it. If the team has decided, write it in the style guide.
Why it matters
Whether Japanese text writes letters and digits full-width (ABC123) or half-width (ABC123) is a choice either way. What reads badly is mixing both in one document, which makes search treat them as different words and makes a pasted sentence stand out. chaff does not decide which is right; for single letters, words, single digits and longer numbers separately, it points at whichever the document uses less (a document that writes one-digit numbers full-width and longer ones half-width is consistent within each group). It says nothing when the minority is more than a third of its group, since the document then uses the two on purpose (full-width only for counters, for example). Quotations in brackets, item and note numbers (1., (1), ※1), a number at the head of a list item, a sentence that starts with a note number or holds a URL, and English sentences inside Japanese text are not counted.
What it does not flag
Quotations in brackets, item and note numbers (1., (1), ※1), a number at the head of a list item, the rest of a version number (the 2 of TLS1.2), a date line at the head of the document (更新日:令和7年9月27日), the label of a number (TEL:03…), a piece of a word joined by an apostrophe (the t of Van't Hoff), and notes or sentences with a URL are not counted. A half-width English word with lower case (the for and Science of AI for Science) counts toward the document's way of writing letters but is never reported itself, since English words stay half-width even where acronyms are full-width. Single letters, words, single digits and longer numbers are compared separately, so "one digit full-width, more digits half-width" counts as consistent. Neither way is called right.
Turning it off or relaxing it
Technical details
- Layer
- L3
- Status
- stable
- Severity
- info
- Languages
- ja
- 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).
| strict | reported when the minority form is 49% of its group or less |
|---|---|
| normal | reported when the minority form is 34% of its group or less |
| relaxed | reported when the minority form is 20% of its group or less |
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
Message
"{written}" here, where the document usually writes "{other}" ({count} of {of})
Full-width "{written}" here, where the document usually writes half-width "{other}" ({count} of {of})
Half-width "{written}" here, where the document usually writes full-width "{other}" ({count} of {of})
This page is built from the rule's definition file:packages/chaff/rules/fullwidth-alnum-consistency.yaml