lindell / lindell/JsBarcode

Invalid GS1-128, how come?

Open
#392 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
5.9k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

First off, I'm new to GS1-128 barcode - I read a little, but that's it.

I need to generate barcodes because I only have access to the string number below the code but not the codes themselves.

(This is a number I found online in an example) Data is `019931009500035815990827300331031412310509721090023`

This website makes the barcode and format the text properly.
https://barcode.tec-it.com/en/EANUCC128?data=019931009500035815990827300331031412310509721090023

But when I use JsBarcode with CODE128C and `ean128 : true` I get `"019931009500035815990827300331031412310509721090023" is not a valid input for CODE128C2 runtime-core.esm-bundler.js:6764:12`

I'm only making a small tool to help my boss, but I'm not sure if I can safely post some of the codes I have here. My codes seem to follow all Application Identifiers, and tec-it (website above) seems to replicate it nicely.

What I am doing wrong here? Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported CODE128C validation error with the exact data and the `ean128: true` option in JsBarcode. Read the CODE128C input validation and GS1-128 handling, then determine whether the input is unsupported or incorrectly rejected; done means a confirmed behavior with an appropriate fix or clear documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.