FAILURE MAP
← Case archive

FA-72642 / Check-digit algorithms / Member archive

Code 128 set A scores control characters by code point · case 02

Barcodes carrying tab or other control characters in set A get wrong check symbols.

Member previewVariant 2 · 3 implementations · 8 checks per implementation

Case contract

Code 128 symbol check value. Start codes A/B/C have values 103/104/105 (other codes: None). Code B accepts characters 32..127 (value ord - 32); code A accepts 0..95 (values ord - 32, controls ord + 64); code C accepts an even number of ASCII digits taken in pairs (value 0..99). The checksum is (start + sum(position * value)) mod 103 with positions starting at 1 after the start code. Invalid data returns None.

Why this case matters

Label printers compute the Code 128 check symbol before rendering shipping barcodes.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
regression ["A", ",B\u001e\u000e_#Y"]3167Failed

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 ↗