Closed scashin133 closed 6 years ago
From the tests, looks like it was for Trader Joe's, which uses EAN-8. I think the issue is there may not be a reliable way to tell if an 8-digit code is UPC-E or EAN-8. We probably need to pass this info from the scanner to Barkick for 8-digit codes.
You can now do GTIN.new(code, type: :upc_e)
on master.
Pushed a new version as well - upgrade instructions here https://github.com/ankane/barkick#010
00985234 is a valid UPC-E barcode but the current GTIN library skips it because the 2nd digit is a 0.
Do you know why for the detection you ignored codes where the 2nd digit is a 0? I searched but couldn't find anything saying this was a valid way to differentiate the codes.
I'm happy to work on a fix, but would want to learn more about why the detection works the way it does today.