12 digits in EAN13

146 views
Skip to first unread message

Dmitri Zhuchkov

unread,
Aug 21, 2009, 2:35:58 PM8/21/09
to Barby
Why barby uses 12 digits for EAN13? As far as I know it should use 13
symbols where the last is checksum http://www.mecsw.com/specs/ean_13.html.

Dmitri

Tore Darell

unread,
Aug 21, 2009, 2:41:47 PM8/21/09
to Barby
Hi Dmitri,

The checksum is calculated automatically:

Barby::EAN13.new("123456789012").data_with_checksum
=> "1234567890128"

Tore

Dmitri Zhuchkov

unread,
Aug 21, 2009, 11:21:19 PM8/21/09
to ruby-...@googlegroups.com
Thank you, now I see the difference.

-- Dmitri
Reply all
Reply to author
Forward
0 new messages