-
Notifications
You must be signed in to change notification settings - Fork 26
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
Code-128 does not encode with FNC-1 character (needed for GS1-128) #46
Comments
Hi @Ragiton, thanks for reporting and sorry for the belated answer. The core issue is that so far there's no way to input
I'm not convinced it should be the input. Since this is not about changing the fonts, but only about changing the encoder, I'd rather prefer e.g. |
@graphicore thanks for the response! Totally makes sense to use an escape character. Using the Ê char is kind of a hack. It would be really nice to be able to use the encoder with all values! The checksum calculation makes it difficult to use a manual workaround in the mean time. |
I needed this for our own project (dealing with GS-1) so I wrote a little encoder that also supports the various FNCx of Code128. I just pushed it out here https://www.npmjs.com/package/@juit/librebarcode PLZ note, it's a clean-room implementation of the EAN "compatible" and Code128 encoders (and all tests pass), so any help with further testing would be really appreciated! Bonus points, it's both CJS and ESM and has no dependencies (no Node) so should work pretty much everywhere! |
@pfumagalli Very nice to see alternative implementations of some encoders! We should mention them in the docs. |
@pfumagalli I should probably start porting your tests. :-) |
Thanks, I'd be happy to help, if you setup a testing framework for the encoders! Note, the results the |
This is wonderful! Could I make a feature request? For those of us unable to help ourselves with the source alone, would a web implementation be possible? Maybe something similar to the textbox 128 encoder on /graphicore/librebarcode ? |
@rhdaly managed to get the "demo" live here |
@pfumagalli This is great! I'd like to link to it from the docs page at https://graphicore.github.io/librebarcode/documentation/code128 |
Code-128 encoder does not work with an FNC-1 character.
I'd like to be able to add the "Ê" char to put an FNC-1 at the beginning of the barcode and have the encoder work.
( I pulled the "Ê" char out of the data map [here] )(
librebarcode/app/lib/code128Encoder/encoder.mjs
Line 110 in f9864c4
This is needed to be able to meet the GS1-128 barcode standard to create GTIN numbers.
The text was updated successfully, but these errors were encountered: