In one of my job project, i’ve needed to implement the middle check digit for EAN13. If you search on internet nobody will tell you how to determine the digit. On of my foreign collegues from Bizerba, gave me the mecanism for the digit calculation.
I’ve attached the source code for my implemention.
Enjoy and don’t forget to modify it as you need. 🙂