5

can a valid 13-digit ISBN have any character other then digit 0-9? i.e., can a valid 13-digit ISBN contain character 'X'?

Charles
  • 50,943
  • 13
  • 104
  • 142
gbhatnagar
  • 51
  • 1
  • 2
  • 2
    At first sight this doesn't appear programming related, but I'm assuming you're writing something to validate ISBNs – ChrisF Jan 11 '10 at 11:38
  • 2
    ISBN is a valid urn. data validation is about CS, as well as checksumming. so it's a valid question. – Stefano Borini Jan 11 '10 at 11:47

3 Answers3

9

No, a 10-digit ISBN can, though... See http://en.wikipedia.org/wiki/International_Standard_Book_Number#ISBN-13

Lennaert
  • 2,455
  • 15
  • 15
4

No, a 13-digit ISBN uses modulo 10 in calculation of the check digit, so the check digit can be only 0 to 9. Other digits are also 0 to 9 in any versions of ISBN. See this Wikipedia article for details.

BenMorel
  • 34,448
  • 50
  • 182
  • 322
sharptooth
  • 167,383
  • 100
  • 513
  • 979
0

No it can't - the Wikipedia page explains:

The calculation of an ISBN-13 check digit begins with the first 12 digits of the thirteen-digit ISBN (thus excluding the check digit itself). Each digit, from left to right, is alternately multiplied by 1 or 3, then those products are summed modulo 10 to give a value ranging from 0 to 9. Subtracted from 10, that leaves a result from 1 to 10. A zero (0) replaces a ten (10), so, in all cases, a single check digit results.

ChrisF
  • 134,786
  • 31
  • 255
  • 325
  • and precisely where does it say so? – SilentGhost Jan 11 '10 at 11:40
  • 3
    This is not correct: A 13-digit ISBN cannot contain X's, only 10-digit ISBNs (since they do a mod 11 and need to display the value 10 in 1 char) – Lennaert Jan 11 '10 at 11:40
  • I can't find any such examples. The article says: "The International Standard Book Number (ISBN) is a unique[1] numeric commercial book identifier..." It looks like they use x as a placeholder for "any digit". – Costique Jan 11 '10 at 11:41