ITF-12 checkdigit? Multi-block

99 views
Skip to first unread message

Alroger Jr

unread,
May 9, 2016, 3:10:53 PM5/9/16
to zxing
Greetings!

Can anyone tell me why I Barcode Scanner, or even Google Goggles, won't report the last digit of each ITF-12 block? I'm assuming it's ITF-12 because Barcode Scanner tells me ITF and there are 4x 12 digit blocks.
These are common power bills that I would like to scan to facilitate payment.

Cheers.

Screenshot_20160509-160356.png

Lachezar Dobrev

unread,
May 10, 2016, 9:37:45 AM5/10/16
to Alroger Jr, zxing
  This looks like a combination of multiple number, each of those with it's own check-sum, which is removed in the bar-code. So 4 pieces of 12 digits end up being 4×11 digits bar-code.
  Without performing a deeper analysis I would say that ZXing is right, and the encoded content is what it says. It might be on purpose, or some error in the encoding process of the generation.
  There may be some obscure bug that would make ZXing skip 1 in 12 digits, but it seems unlikely.


--
You received this message because you are subscribed to the Google Groups "zxing" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zxing+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

AlrogerJr

unread,
May 10, 2016, 10:34:58 AM5/10/16
to Lachezar Dobrev, zxing
Thanks, I'll look into it. 
--
Alroger Jr - Google Inbox
Message has been deleted

Alroger Jr

unread,
May 10, 2016, 11:26:43 AM5/10/16
to zxing, royer....@gmail.com
I did some research and apparently most bills down in Brazil are encoded i25 (interleaved 2 of 5) with checkdigit. I was able to get the following result with another App called CIGAM Boletos:
https://play.google.com/store/apps/details?id=br.com.cigam.boletos
It contains all the digits. But I have to delete the dashes and spaces to actually use the number.
83600000002-3 54700048100-2 00501366861-0 00133378485-6

So I suppose it is reading it correctly, wonder why it's ommiting the checkdigit. Isn't there a "raw" mode or something that just reads all the numbers for me?

Sean Owen

unread,
May 10, 2016, 11:34:31 AM5/10/16
to zxing, royer....@gmail.com
Are you sure it's ITF? the check digit is optional and not even checked by the app.

Alroger Jr

unread,
May 10, 2016, 11:50:29 AM5/10/16
to zxing, royer....@gmail.com
On Tuesday, 10 May 2016 12:34:31 UTC-3, Sean Owen wrote:
> Are you sure it's ITF? the check digit is optional and not even checked by the app.

I think it is i25, as posted right above.

Lachezar Dobrev

unread,
May 11, 2016, 9:19:49 AM5/11/16
to Alroger Jr, zxing
  I took a manual look at the bar-code.
  It does seem to be ITF (Interleaved 2 of 5).
  I counted 114 bars.
  That means there are 113 white spaces between them.
  Than means there are 227 bars and spaces (B&S).
  There are 4 B&S as start guard.
  There are 3 B&S as end guard.
  That leaves 220 B&S for the actual bar-code.
  Every 10 B&S encode a pair of digits.
  That means there are 22 pairs of digits.
  That means there are 44 digits in the bar-code.
  That seems to confirm my initial observation about the 4 pieces of 11 digits each.

  My assumption would be, that the application you're referring to knows about these 4×11 bar-codes and calculates the 12-th digit for every 11 digit number.
  My attempts to assess what the check sum algorithm were unsuccessful, but I managed to dig out something in Portuguese [1] (which I do not speak), that seems to hint at modulo 11 or modulo 10 operations, but I was unable to properly verify that.

  I still do not believe there is an issue with ZXing.

2016-05-10 18:25 GMT+03:00 Alroger Jr <royer....@gmail.com>:
I did some research and apparently most bills down in Brazil are encoded i25 (interleaved 2 of 5) with checkdigit. I was able to get the following result with another App called CIGAM Boletos:

It contains all the digits. But I have to delete the dashes and spaces to actually use the number.

So I suppose it is reading it correctly, wonder why it's ommiting the checkdigit. Isn't there a "raw" mode or something that just reads all the numbers for me?

AlrogerJr

unread,
May 11, 2016, 3:08:40 PM5/11/16
to Lachezar Dobrev, zxing
Thanks for the info. 
So the app is responsible for creating the 12th digit.
Reply all
Reply to author
Forward
0 new messages