lindell / lindell/JsBarcode

I meet a problem about code128

Open
#405 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5.9k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

If the text structure is like this:

C(n)A(1)B(n) OR C(n)B(1)A(n)

the encoding will calculate incorrectly.

>
```

JsBarcode("#barcode1", "12345678"+"\x08" + "s");
```
image

the barcode cannot be scan correctly.

I think the problem is in auto.js :
image

the matched character should not be replaced ,if before it is CODEC。
because you haven't process the condition that set is SET_C , so the CODEA character will be treated as CODEC
image

Contributor guide

Open the contributing guide

Research direction

Start in auto.js and reproduce the reported JsBarcode example using the Code 128 input containing "\x08" and "s". Compare the generated encoding for the C(n)A(1)B(n) and C(n)B(1)A(n) structures; the issue is done when the resulting barcode encodes and scans correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.