-
Notifications
You must be signed in to change notification settings - Fork 239
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
Add support for initial FNC1 char in a GS1-C128 barcode #206
Add support for initial FNC1 char in a GS1-C128 barcode #206
Conversation
@@ -172,6 +172,7 @@ void entry(string a, string b, string c, string encoding) | |||
entry("CODE_B", "FNC4", "CODE_B", "10111101110"); | |||
entry("FNC4", "CODE_A", "CODE_A", "11101011110"); | |||
entry("FNC1", "FNC1", "FNC1", "11110101110"); | |||
entry($"{FNC1}", $"{FNC1}", $"{FNC1}", "11110101110"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but doesnt it look at each char and look it up in the dictionary? I think the parsing of the data to encode might have to be adjusted to just look for FNC1 or such instead of adding this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Im going off memory so bare with me :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did this change before summer so my memory is a bit fuzzy. But I think that changing the parsing of the data would be a bigger change. This is just to make sure that the FNC1 character is replaced with the proper code.
And it doesn't feel that the parsing really need to be changed, it's just that the FNC1 char wasn't recognized as it wasn't in the entries. But that is just my take on it, it could be that I am missing something :)
I updated the test to prove what we are trying to do. So you can try and revert the entry and run the test to see the issue I'm trying to solve.
Resolves #179 |
merge from origin
…NC1_char_in_dynamic
…laced the character with the corresponding FNC1 name
Merged my branch with master and fixed tests that is failing. New take is to replace the FNC1 char with FNC1 codeword instead. Seems to work better. |
After testing realized that FNC1 wasn't properly added on a dynamic barcode. Will update this |
In current version if you try to add a GS1-C128 barcode with an initial FNC1 char and using dynamic C128 you will get the following error:
"System.Exception: EC128-3: Could not insert start and code characters.
Message: EC128-2: Could not determine start character."
This fix allows the FNC1 char to be added to the start of the barcode.