Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support EAN-8 and UPC-E #19

Closed
harens opened this issue Nov 30, 2020 · 2 comments
Closed

Support EAN-8 and UPC-E #19

harens opened this issue Nov 30, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@harens
Copy link
Owner

harens commented Nov 30, 2020

EAN-13 and UPC-A, the two more common variants of each standard, are currently supported. It would be useful if EAN-8 and UPC-E, which are generally of a smaller size, are also supported.

See here for details about EAN/UPC barcodes.

@harens harens added the enhancement New feature or request label Nov 30, 2020
@harens
Copy link
Owner Author

harens commented Jun 11, 2021

TIL that EAN-8 is caluclated in the same way as EAN-13, which we already support...

From EAN 8 : How to calculate checksum digit?:

The algorithm is covered in this wikipedia article on EAN, note that EAN-8 is calculated in the same way as EAN-13.

(Credit to Paul Dixon)

With a little bit of refactoring here and there (+ some tests), EAN-8 should be done!

harens added a commit that referenced this issue Jun 18, 2021
@harens
Copy link
Owner Author

harens commented Jun 18, 2021

I need to add some more tests for these formats, but the validation methods are now present as part of GS1! 🎉

@harens harens closed this as completed Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant