01 / Four definitions
Four ways software measures the exact same paragraph
Consider a short bilingual release note: `2026 年发布 v2.4 版本,支持 300 DPI!` Humans see a single concise sentence, yet different counters report four noticeably different numbers depending on what unit they sum.
First is total characters (Unicode code points or glyphs including spaces and punctuation), used by most editorial guidelines and UI counters. Second is characters excluding whitespace, common in translation quotes where spaces should not inflate volume. Third is Han characters (`\p{Script=Han}`), which isolates CJK ideographs and ignores Latin letters, digits, and punctuation.
Fourth is English/whitespace words versus UTF-8 bytes. Whitespace word counters split `v2.4` and `DPI` into one word each while ignoring unspaced CJK text; meanwhile a backend SQL `VARCHAR(255)` limit counts bytes—where ASCII costs 1 byte, common Han characters cost 3 bytes each, and emoji cost 4 or more.
| Counting Metric | ASCII `hello` | One Han Char `字` | Emoji `🚀` | Where It Appears |
|---|---|---|---|---|
| Total Characters (Code Points) | 5 | 1 | 1 (ZWJ groups vary) | Editorial rules, visible UI counters |
| JavaScript `string.length` (UTF-16) | 5 | 1 | 2 (surrogate pair) | Legacy web forms and older APIs |
| Han Script Only | 0 | 1 | 0 | Chinese copywriting & translation volume |
| UTF-8 Bytes | 5 bytes | 3 bytes | 4 bytes | Database columns, CSV/JSON payloads |
02 / Encoding details
Why emoji and rare glyphs silently double-count in naive validators
Many web forms validate length with JavaScript's `.length`, which measures 16-bit UTF-16 code units rather than visible characters. Standard Latin characters and common CJK ideographs sit inside the Basic Multilingual Plane (1 code unit each), whereas almost all modern emoji (`🚀`, `👍`) and supplementary CJK characters require surrogate pairs (2 code units each).
Composite emoji built with Zero-Width Joiners (ZWJ)—such as family icons or profession icons—combine multiple code points into one visual symbol, sometimes reading as 5 to 11 in `.length`. That explains why a form claiming “20 characters left” can suddenly reject a submission when you add two emoji.
Text displays total characters, characters without spaces, Han characters, English words, and paragraphs side by side so you can immediately see whether whitespace, Latin terms, or punctuation is driving the difference.
03 / Reading time
A realistic reading-time formula for English and CJK mixed text
Most English blog plugins compute reading time by splitting on whitespace and dividing by 200 words per minute (WPM). That fails completely on Chinese or Japanese text: a 1,500-character Chinese article with only three spaces around product names would be reported as a “1 minute” read.
Text uses a combined two-track estimate: roughly 300 Han characters per minute (`hanChars / 300`) plus 200 English words per minute (`englishWords / 200`), summed and rounded up with a 1-minute floor.
Worked example: a technical tutorial containing 900 Han characters and 400 English words yields `900 / 300 + 400 / 200 = 3 + 2 = 5 minutes`. Dense code samples, tables, and unfamiliar domain jargon naturally push real reading time higher than linear prose.
04 / Clean drafts
Strip trailing spaces and blank-line bloat before finalizing counts
Text copied from PDFs, spreadsheets, or chat logs almost always carries invisible padding: trailing spaces at line ends and runs of three or four consecutive blank lines. Besides skewing character counts, those artifacts create unwanted empty paragraphs when pasted into CMS editors.
Text's “Copy cleaned” button performs only two predictable edits: removing trailing whitespace per line and collapsing three or more consecutive blank lines down to two—without altering punctuation or wording. All counting and cleanup run strictly in browser memory.
納品前チェック
納品前チェック
次のステップ
ツールを開いて作業を完了
Paste mixed English or CJK copy for instant counts and cleanup.
Open Text counter