FAILURE MAP
← Case archive

FA-79418 / Barcode symbology encoding / Member archive

Odd digit run enters set C without peeling a digit · case 03

A seven-digit run ends with a lone digit that forces another switch back to B.

Member previewVariant 3 · 3 implementations · 8 checks per implementation

Case contract

Plan Code 128 code sets for printable ASCII data (other characters -> None) as a list of [set, text] segments. Start in C when the data begins with at least 4 digits or is entirely digits of even length >= 2, else B. In C consume digit pairs and fall back to B when fewer than two digits remain in the run. In B switch to C before a run of at least 6 digits, or at least 4 digits that reach the end of the data; an odd run first encodes one digit in B. Empty data yields [["B", ""]].

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 fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
regression: odd digit run alignment 0[["B", " "], ["C", "09255480"], ["B", "AB"], ["C", "66367371"], ["B", "3"]][["B", " "], ["C", "09255480"], ["B", "AB6"], ["C", "63673713"]]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 ↗