digits[-11:] was dropping the first digit of 12-digit UPCs. digits[:11] correctly passes the first 11 digits to the barcode library, which calculates the matching check digit. 728192558375 now encodes correctly (was 2819255837X before).
18 KiB
18 KiB