Since Lot number in GS1 standard starts with 10 and has length UP TO 20, and the end is determined with FNC1 symbol, which is invisible, I have no idea how to check wether it really ended or not
This case scenario would work if it was actually seperated by whitespace but not FNC1, any ideas?
function getCode(code, pos, len){
let str = ''
for(pos; pos < len + pos; pos++){
str+=code[pos]
if(str[pos+1] === ' '){
break;
}
}
}
The transmission protocol for all GS1-supported barcode symbologies is that FNC1 non-data characters serving as AI separators in the barcode message be transferred a Group Separator data characters (ASCII 29).
The leading FNC1 character in first position must also be indicated, e.g. via the modifier value of an AIM Symbology Identifier prefix or a similar proxy.
Any scanner that does not do this, or cannot be configured to do this, is seriously defective since it does not comply with the generic symbology standards.