SCRUBBED
INV-2026-0089 | Part #PN-1045-0 | "Smart Quotes" with extra spaces
11 total fixes (6 digit/date/amount look-alikes • 0 ligatures • 0 zero-width • 0 mixed-script)
-- SQLITE 3.45 WAL IDEMPOTENT INGESTION (UTS #39 SCRUBBED PAYLOAD) PRAGMA foreign_keys = ON; CREATE TABLE IF NOT EXISTS ocr_ingested_records ( record_id TEXT PRIMARY KEY, scrubbed_payload TEXT NOT NULL, anomalies_fixed INTEGER DEFAULT 0 ); INSERT OR IGNORE INTO ocr_ingested_records (record_id, scrubbed_payload, anomalies_fixed) VALUES ('REC-20261023-8CE356', 'INV-2026-0089 | Part #PN-1045-0 | "Smart Quotes" with extra spaces', 11);
Copying scanned PDF invoices or SKUs containing Cyrillic/Greek look-alikes, 'fi' ligatures, zero-width spaces, and '$1,2OO.5O' / '1O/l9/2O26' typos directly into SQLite or prompts.
Running NFKC normalization, stripping zero-width characters, mapping mixed-script Cyrillic/Greek look-alikes inside Latin words, fixing O/0 and l/1 inside numeric tokens, and generating a content-hashed SQLite record_id.
| Anomaly Class | Detection & Normalization Rule | Raw Input Example | Scrubbed Output Result |
|---|---|---|---|
| Zero-Width & BOM Characters | Strip U+200B..U+200D, U+FEFF; normalize U+00A0 to space | '[email protected]\u200B' | '[email protected]' (true char length reduced) |
| Typographic Ligatures (NFKC) | Expand U+FB00..U+FB04 (ff, fi, fl, ffi, ffl) + String.normalize('NFKC') | 'Тhe first cliеnt' | 'The first client' (ligature expanded to 'fi') |
| Mixed-Script Confusables | Map Cyrillic/Greek homoglyphs (Т, е, а, О) inside Latin words | 'Тhe cliеnt exаmple.com' | 'The client example.com' (all-Latin characters) |
| Numeric & Date O/0 and l/I/1 | Fix O->0 and l/I->1 inside dates, $ amounts, and INV/PN/SKU codes | '$1,2OO.5O on 1O/l9/2O26' | '$1,200.50 on 10/19/2026' |
| Idempotent SQLite Record ID | REC-YYYYMMDD-<6-hex DJB2 hash of cleaned text> | Two distinct invoices | Two unique record_id values (never drops rows) |
They look almost the same in many fonts, so the scanner guesses. The surrounding number usually shows which one is right.
Invisible characters that can break searching, matching and code. They often come along when text is copied from web pages or PDFs.
No. The cleaner runs in your browser.