FAILURE MAP
← Case archive

FA-79393 / Barcode symbology encoding / Member archive

UPC-E expansion accepts number systems other than 0 and 1 · case 03

Mistyped codes with a leading 2 are expanded to UPC-A instead of being rejected.

Member previewVariant 3 · 3 implementations · 8 checks per implementation

Case contract

Expand an 8-digit zero-suppressed UPC-E string (number system 0 or 1, six digits d1..d6, check digit passed through) into 12-digit UPC-A: d6 in 0-2 -> d1 d2 d6 0000 d3 d4 d5; d6 = 3 -> d1 d2 d3 00000 d4 d5; d6 = 4 -> d1 d2 d3 d4 00000 d5; d6 in 5-9 -> d1..d5 0000 d6. Invalid input returns None.

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: number system restriction 0"219100002237"nullFailed

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 ↗