Pila 77
Pila 77

Reputation: 415

bwip.js replaces "/" character by "-"

Im using bwip.js to create a GS1 datamatrix. We need to use slash (/) character in batch/lot field. Everything goes well but when I use barcode reader it reads "-" instead "/".

var data = "(01)08400111114085(17)250128(10)18/03/2025"

return bwipjs.toSVG({
    bcid: 'gs1datamatrix', 
    text: data,
    scale: 1,  
    includetext: false    
});

what i get when reads is "0108400111114085172501281018-03-2025"

I tried to use another character like "-" but this time it changes yo "'"

Solved The problem was in barcode reader as Mark Warren sugested, so I set the keyboard to spanish and voila! the slash character reads well

Upvotes: 0

Views: 57

Answers (1)

Mark Warren
Mark Warren

Reputation: 1491

I cannot reproduce the issue. It may be a function of the barcode reader. For reference, this is what the public API renders:

https://bwipjs-api.metafloor.com/?bcid=gs1datamatrix&text=(01)08400111114085(17)250128(10)18/03/2025&padding=4&backgroundcolor=fff&scale=3

And this is the decode result from zxing:

zxing decode result

Upvotes: 1

Related Questions