bitflower / gs1js

GS1JS is a Javascript GS1 barcode content parser for NodeJS and the browser written in Typescript.
16 stars 4 forks source link

AIs with more than 2 digits not working #2

Open csaar95 opened 2 years ago

csaar95 commented 2 years ago

The parsing of following code 241ABC1234<FNC1>100815 results in:

 [{
   "identifier": "24",
   "value": "1ABC1234",
   "length": 8
 }, {
   "identifier": "10",
   "value": "0815",
   "length": 4
 }]

The AI 24 doesn't exist (https://www.gs1.org/standards/barcodes/application-identifiers), the correct result would've been identifier "241" and value "ABC1234".

Unortunately in this case the module is absolutely useless:/

bitflower commented 2 years ago

PRs welcome. This is open source ;-)

csaar95 commented 2 years ago

Hello Matthias, after reading over ur code, I decided to solve it in a fresh piece of code. I didn't see a possibility fixing the "design mistake" to only react on two digit AIs without rewriting mostly of the code. I finished the parser today, and we'll probably publish it in the next time. I'll link it here! Hopefully u'll don't take my criticism the wrong way.

Remo commented 2 years ago

@csaar95 did you ever get to finish your code?

csaar95 commented 2 years ago

@Remo It is, but I didnt publish it yet, are you interested?

Remo commented 2 years ago

@csaar95 well, I am looking for a gs1 parser, so yes 😉

AlexandreKueny commented 1 year ago

@csaar95 I'm also really interested in a working parser 😄