FA-79608 / Barcode symbology encoding / Member archive
Plain Code 128 scans are parsed as GS1 · case 03
Internal Code 128 labels whose text happens to start with digits are interpreted as GTINs.
Case contract
Parse scanner output of a GS1-128 symbol: it must start with the symbology identifier "]C1"; FNC1 separators arrive as GS (0x1D) and redundant separators are skipped. AIs are recognised by the shortest matching prefix among the predefined fixed-length AIs (00:18, 01/02:14, 11/13/15/17:6, 3103:6) and variable AIs (10/21 max 20, 30/37 max 8, 400 max 30). A fixed field must be complete and contain no GS; a variable field runs to the next GS or the end and must have 1..max characters. Return [[ai, value], ...] or an error.
Why this case matters
Retail, logistics, pharmacy and document workflows depend on encoders that produce exactly the module pattern, code-set switches, separators and quiet zones scanners expect; one misplaced module or separator makes a label unreadable or, worse, scan as different data.
One recorded failure
Sample boundary fixtureThis sample comes from the broken implementation of a controlled reproducer.
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| regression: symbology identifier check 0 | [["30", "4"]] | {"error": "not-gs1"} | Failed |
MEMBER ARCHIVE
The complete case is available to members.
This record includes three runnable implementations, regression fixtures, execution results, and source hashes.
Member access is invitation-based. Sign in with your invited account to inspect the sources.
Sign in to the archive ↗