ISBN 转换与校验
粘贴任一形式的 ISBN —— 两种形式都给你,并各自用对应的算法校验。一本书一行,不用先选格式。
🔒 你的数据不会离开浏览器。
两种形式,两套完全不同的校验位
大多数 ISBN 代码就错在这里。ISBN-10 用的是模 11 校验和,权重从 10 递减到 2 —— 当校验值算出来是 10 时,写作字母 X。而 ISBN-13 用的是 GS1 的模 10 校验和,与其他任何条码一样。
两者不能互换。拿条码那套算法去算 10 位 ISBN,每次都会得出错误的校验位 —— 这正是那么多「校验器」会拒绝掉完全正常的、以 X 结尾的 ISBN 的原因。
两者之间怎么转
从 10 位转 13 位:前面加 978,去掉旧的校验字符,用 GS1 算法重算。中间那九位数字始终不变 —— 那才是这本书真正的身份。反向转换就是把这个过程倒过来。
为什么有些 ISBN 没有 10 位形式
979 前缀是在 ISBN-10 于 2007 年停用之后才启用的。以它分配的书从来没有过、将来也不会有 10 位形式。给你一个 10 位形式的工具,是在生成一个不指向任何东西的号码 —— 所以本工具会直接告诉你它不存在。
有一个子号段比较特殊:979-0 保留给 ISMN,也就是印刷乐谱的标识符。它扫起来像 ISBN,但应当填在乐谱出版物字段里。
本工具执行的全部检查(共 13 条规则)
格式与长度
ISBN-F01 不是合法的 ISBN 长度
ISBN 要么是 10 个字符(2007 年前的旧形式),要么是 13 位数字(现行形式)。其他长度都不是 ISBN —— 9 位通常是丢了前导零,12 位是 ISBN-13 被截断了。
修复: 核对版权页上的号码。9 个字符的值往往是丢了前导零的 ISBN-10。
来源: ISO 2108 (ISBN) and the ISBN International registration-group structure. Rule wording and edge cases are verified against real published ISBNs in our regression tests.
ISBN-F02 含非法字符
只允许数字,唯一的例外是 ISBN-10 的最后一位可以是 X(代表校验值 10)。小写 x 会被接受并规范化为大写。
修复: 去掉字母和符号。如果末位是 x,请写成大写 X。
来源: ISO 2108 (ISBN) and the ISBN International registration-group structure. Rule wording and edge cases are verified against real published ISBNs in our regression tests.
ISBN-F03 X 出现在校验位以外的位置
X 只能出现在 ISBN-10 的最后一位,代表校验值 10。出现在其他任何位置都不合法。
修复: 改正那一位 —— X 不是数字,它是一个校验值。
来源: ISO 2108 (ISBN) and the ISBN International registration-group structure. Rule wording and edge cases are verified against real published ISBNs in our regression tests.
ISBN-F04 ISBN-13 缺少 Bookland 前缀
13 位的 ISBN 必须以 978 或 979 开头。以其他数字开头的 13 位号码是普通 GTIN,不是 ISBN。
修复: 如果这是商品条码而不是图书标识,请改用 GTIN 校验器。
来源: ISO 2108 (ISBN) and the ISBN International registration-group structure. Rule wording and edge cases are verified against real published ISBNs in our regression tests.
ISBN-F05 已移除连字符与空格
ISBN 印刷时常带连字符,用来分隔注册组、注册人与出版物三段。它们不携带校验用的数据,已在校验前去掉。
来源: ISO 2108 (ISBN) and the ISBN International registration-group structure. Rule wording and edge cases are verified against real published ISBNs in our regression tests.
校验位(两套不同的算法)
ISBN-C01 ISBN-10 校验位错误
ISBN-10 的最后一位是模 11 校验值:前九位自左起按 10 到 2 加权求和,校验值把总和补足为 11 的倍数。校验值为 10 时写作 X。这与 ISBN-13 用的算法不是同一套。
修复: 与版权页上的号码逐位核对。
来源: ISO 2108 (ISBN) and the ISBN International registration-group structure. Rule wording and edge cases are verified against real published ISBNs in our regression tests.
ISBN-C02 ISBN-13 校验位错误
ISBN-13 用的是 GS1 的模 10 校验和(自左起交替加权 1 和 3),与任何其他 GTIN-13 是同一套算法。
修复: 与封底条码上的号码逐位核对。
来源: ISO 2108 (ISBN) and the ISBN International registration-group structure. Rule wording and edge cases are verified against real published ISBNs in our regression tests.
转换与等价关系
ISBN-V01 ISBN-10 ⇄ ISBN-13 等价
ISBN-10 前面加上 978、再用 GS1 算法重算校验位,就成了 ISBN-13。中间那九位数字始终不变 —— 两种形式标识的是同一本书。
来源: ISO 2108 (ISBN) and the ISBN International registration-group structure. Rule wording and edge cases are verified against real published ISBNs in our regression tests.
ISBN-V02 不存在 ISBN-10 形式(979 前缀)
只有以 978 开头的 ISBN 才有 10 字符形式。979 前缀是在 ISBN-10 停用之后才启用的,以它分配的书从来就没有过 10 字符形式 —— 这不是错误,而任何声称能把 979 的 ISBN「转换」成 10 字符的工具,都是在凭空造号码。
来源: ISO 2108 (ISBN) and the ISBN International registration-group structure. Rule wording and edge cases are verified against real published ISBNs in our regression tests.
ISBN-V03 979-0 是 ISMN,不是 ISBN
979-0 号段保留给 ISMN —— 印刷乐谱(单曲谱、总谱)的标识符。它是合法条码,但应当填在乐谱出版物字段里,而不是 ISBN 字段。
来源: ISO 2108 (ISBN) and the ISBN International registration-group structure. Rule wording and edge cases are verified against real published ISBNs in our regression tests.
注册组
ISBN-G01 注册组
978/979 前缀之后的那一段标识注册组 —— 一个国家、地理或语言区域。它告诉你号码是哪家 ISBN 机构分配的,而不是书在哪里印刷、正文是什么语言。
来源: ISO 2108 (ISBN) and the ISBN International registration-group structure. Rule wording and edge cases are verified against real published ISBNs in our regression tests.
ISBN-G02 注册组不在本工具的表内
这个注册组不在本工具的表里。国际 ISBN 中心会不断新增注册组,所以仅凭这一点不能判定该 ISBN 无效。
来源: ISO 2108 (ISBN) and the ISBN International registration-group structure. Rule wording and edge cases are verified against real published ISBNs in our regression tests.
合理性
ISBN-P02 全同或连续数字
0000000000、1234567890 这类值是占位码。其中一些会碰巧满足校验和 —— 这恰恰说明只查校验和的校验器是不够的。
修复: 使用书上实际印着的 ISBN。
来源: ISO 2108 (ISBN) and the ISBN International registration-group structure. Rule wording and edge cases are verified against real published ISBNs in our regression tests.
尚未支持:连字符分段(把 ISBN 拆成前缀、注册组、注册人与出版物四段)。要正确做到这一点,需要官方的 ISBN 注册人号段数据,而我们还没有接入 —— 靠猜来拆分只会产出一个自信满满的错误结果。这里改为展示注册组的识别结果。
关于这些规则。 每一条都有编号、严重级别和通俗解释。每个来源链接都已登记在案,并对线上页面实际复验过,而不是凭印象写上去的. 规则如何编写、测试与保持更新 →