Author: avarab
Description:
Currently we detect ISBN links by looking for strings like (regex) "ISBN
([0123456789-Xx]+) in the text and work with that. However the ISBN standard
comes with a built in checksum algorithm that allows one to see if the number in
question is actually a conforming number or just a bunch of gibberish.
We should check if that's the case (gibberish) and not give it the special "ISBN
treatment"
The algorithm is as follows:
- 1. Take an ISBN number like ISBN 0-596-00287-4 (for [[Free as in Freedom]])
- 2. Split the numbers into the ISBN number and the check digit (0-596-00287 and 4)
- 4. Multiply each ISBN digit by its place in the number sequance (nondigits
omitted) counting from 1
if (1*0 + 2*5 + 3*9 + 4*6 + 5*0 + 6*0 + 7*2 + 8*8 + 9*7) mod 11 = 4 (the check
digit) the number is valid, else it's invalid.
Version: unspecified
Severity: enhancement
URL: http://en.wikipedia.org/wiki/ISBN