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

Optional ean13 country exception. #128

Merged

Conversation

CanSeeThePain
Copy link
Contributor

No description provided.

@barnhill
Copy link
Owner

barnhill commented May 7, 2021

Can I get a description of why this is needed?

@CanSeeThePain
Copy link
Contributor Author

Can I get a description of why this is needed?
Hi, Brad. Our company uses EAN13 for internal tasks, inside our country. Because of it, the country code is not used. We use the whole number as ID. And some numbers cause "invalid country code" exceptions. But managers say these numbers are necessary. So, without these changes, we can't use nuget package of BarcodeLib to replace our own legacy code.

@rob313663
Copy link
Contributor

rob313663 commented May 9, 2021 via email

@barnhill barnhill self-assigned this May 9, 2021
@barnhill barnhill merged commit 4239194 into barnhill:master May 9, 2021
@barnhill
Copy link
Owner

barnhill commented May 9, 2021

@rob313663 and @CanSeeThePain,

I just released 2.4.0 to NuGet. It might take a little bit to show up but its on its way. The feature you added I modified slightly to allow for disabling of country code parsing and not just throwing the exception away. This will allow for slightly better efficient generation of EAN-13 codes. Same general concept but just took it a step further. I have also allowed for retrieval of the country code via a property since that was overlooked originally. Thanks for the submission and keep the updates coming! Keep me posted on how you are using it just for my curiosity!

@CanSeeThePain
Copy link
Contributor Author

CanSeeThePain commented May 10, 2021

I just released 2.4.0 to NuGet. (...)

Thank you very much! My team leader will be happy to get these changes in the NuGet package :)

@CanSeeThePain
Copy link
Contributor Author

After loading 2.4.0 and adding it to my project, I tried to reproduce the country exception, but to no avail. It seems that now, because all country codes between 0 and 100 filled, at least 2-digits country code will always present. So I think that exception now is unreachable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants