Jump to content

Talk:ISBN

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Semi-protected edit request on 21 November 2023

[edit]

Change the establishment date from 1970 to 1967, as this is the more accurate date. My source is "https://www.archwaypublishing.com/en/faq/10-things-you-should-know-about-isbn" Guano islands (talk) 02:01, 21 November 2023 (UTC)[reply]

 Done Changed date and added reference. Lewcm Talk to me! 22:06, 21 November 2023 (UTC)[reply]

Semi-protected edit request on 29 January 2024

[edit]

Please remove these phrases:

will each have a different ISBN.
will each have a different ISBN assigned to it.

and replace them with:

must each have a different ISBN.
must each have a different ISBN assigned to it.

#1 is a lede summary dependent on #2, which relies on a source that says that each edition "shall be assigned" a different ISBN. Sometimes, publishers don't comply and don't assign separate ISBNs to different editions, so "will" is wrong, but "must" isn't affected by non-compliance. 123.51.107.94 (talk) 00:55, 29 January 2024 (UTC)[reply]

 Done I think "must" is better wording. In the document, "shall" is a pretty bad word for them to use as it can mean either "must" or "will" (thesaurus.com says they're synonyms.) Coulomb1 (talk) 02:15, 29 January 2024 (UTC)[reply]

checking for valid ISBN

[edit]

Currently the article has a function `CheckISBN()` written in C that returns the error syndrome. However, it expects the input to be `int const digits[10]`, which is quite nonsensical and to the least impractical. Bytes would be more appropriate for digits -- where would you find an ISBN coded as array of ten 32-bit integers? It would be easy to allow to scan a string of bytes that might indifferently be UTF-8 or integer digits. I suggest the following code:

def CheckISBN(digits: Iterable) -> int:
    """Return ISBN error syndrome, zero for a valid ISBN, non-zero for an invalid one.
    Items in 'digits' that can't be cast to integer are ignored."""
    c = t = s = u = 0
    for d in digits:
        try:
            if c&1: u += int(d)    # for 13-digit ISBN
            t += int(d); s += t; c += 1
        except ValueError: pass    # ignore non-digits like spaces, '-', ...
    if c == 10: return s % 11
    if c != 13: raise ValueError(f"Expected 10 or 13 digits, got {c}.")
    return (t+2*u) % 10

If the C implementation is to be retained, one could use `t += digits[i] & 15` to convert ASCII digits to integers. As explained earlier, the argument should be `char digits[10]` to use bytes or characters rather than 32-bit integers. — MFH:Talk 17:31, 20 May 2024 (UTC)[reply]

I disagree. That just obfuscates the straightforward algorithm. KISS principle ToraNeko (talk) ToraNeko (talk) 10:32, 31 May 2024 (UTC)[reply]

Semi-protected edit request on 9 September 2024

[edit]

Mr Shakti raj}it suggests in this application software 2409:40E5:BB:AAD5:D842:FEFF:FE58:E11D (talk) 18:46, 9 September 2024 (UTC)[reply]

 Not done: it's not clear what changes you want to be made. Please mention the specific changes in a "change X to Y" format and provide a reliable source if appropriate. ⸺(Random)staplers 20:29, 9 September 2024 (UTC)[reply]