Leading zeroes in barcodes are truncated
See original GitHub issueDescribe the bug Whenever I scan a barcode like this: The result that gets printed is only the digits after the leading zeroes.
To Reproduce Steps to reproduce the behavior:
- Go to the barcode scanner app
- Scan the barcode attached
- Check result
Expected behavior When the barcode is scanned, the value should be 00002408, not 2408.
Smartphone (please complete the following information):
- Device: iPhone 7
- OS: 13
Additional context I take the value and I run these functions:
...
sBarcode(someVal) async {
String bCode = await FlutterBarcodeScanner.scanBarcode("#ff6666", "Cancel", true);
print(bCode);
someVal.enterBarcode(bCode);
return;
}
...
enterBarcode(barc) {
flutterWebViewPlugin.evalJavascript(`document.getElementById('barcodenumber').value="${barc}";`);
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
How to remove the leading zero when scanning an UPC-A ...
When scanning a UPC-A bar code an extra zero is being added to the beginning of the data. How can this be removed?...
Read more >Leading Zero Problem in product barcode - SAP Community
we are migrating from a system which allows leading zeros in bar-code ... as sap does not recognize leading zeros and truncates the...
Read more >Barcode 101 - GTIN
he UPC-E code's most basic trick is to remove trailing zeroes in the manufacturer's code, and leading zeroes in the product code.
Read more >How do I stop leading zeros from deleting in UPC's during ...
You can fix the UPCs to include the leading zeros by opening your exported SKU file in excel, select the UPC column, right...
Read more >How do I prevent Excel from removing leading zeros in ...
How do I prevent Excel from removing leading zeros in product id or upc? It is important to remember that when preparing data...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Nevermind I’ve solved the error. Instead of doing this:
Do this
Im attaching it
This is a barcode type: Interleaved2of5 Whenever I scan this barcode I expect the result to be 00002463 but I’m getting “1331” as a result
Any ideas why? I’ve been trying to debug this You can even test here: https://www.barcodesinc.com/generator/image.php?code=00002463&style=453&type=I25&width=300&height=125&xres=2&font=3