From 473ac693e92da2ca3b26844e6b68b1e38e4e3c37 Mon Sep 17 00:00:00 2001 From: "Jeffrey C. Ollie" Date: Thu, 10 Sep 2026 10:21:43 -0500 Subject: [PATCH] Refresh the registration group and registrant ranges Regenerated with `zig build update-ranges`. The agency has moved eight groups since the last run -- 978-1, 978-81, 978-624, 978-627, 978-9912, 978-99952, 978-99989 and 979-8 -- taking the rule count from 1862 to 1868. No group was added or removed, so all 287 remain. Stale range data does not fail loudly, which is the reason to keep it current. It hyphenates in the wrong place. India's 978-81 now splits 1700000-1799999 off as five-digit registrants, so 9788117000007 hyphenates as 978-81-17000-00-7 where the old data gave 978-81-17-00000-7; both look plausible and only one is right. Verified by running both files against that ISBN rather than reading the diff. The fingerprint in the header moves with the data, which is what it is for: it covers the emitted ranges and not the serial number and date the agency stamps afresh on every download, so a changed fingerprint means the ranges themselves changed. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01NJz47vhFE5XcSQUDbfP1N3 --- src/ranges.zig | 52 ++++++++++++++++++++++++++++---------------------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/src/ranges.zig b/src/ranges.zig index 835ed69..0b30cb4 100644 --- a/src/ranges.zig +++ b/src/ranges.zig @@ -6,8 +6,8 @@ //! range data (https://www.isbn-international.org/export_rangemessage.xml). //! Do not edit by hand. //! -//! 287 registration groups, 1862 rules. -//! Data fingerprint: 87157b645f2d9cca037ffee58be4ff24c34443975b4687b96d128d0c4890f8e8 +//! 287 registration groups, 1868 rules. +//! Data fingerprint: 3eaa9d5c70e54a7cb735ed1515cf442fa514274b0dc3d26323670c0d3037571b //! //! The fingerprint covers the ranges below and nothing else. The agency //! stamps a fresh MessageSerialNumber and MessageDate on every download, @@ -77,11 +77,8 @@ pub const groups: []const Group = &.{ .{ .min = 470000, .max = 479999, .len = 3 }, .{ .min = 480000, .max = 499999, .len = 4 }, .{ .min = 500000, .max = 599999, .len = 2 }, - .{ .min = 600000, .max = 664999, .len = 0 }, - .{ .min = 665000, .max = 665749, .len = 7 }, - .{ .min = 665750, .max = 665999, .len = 7 }, - .{ .min = 666000, .max = 669999, .len = 7 }, - .{ .min = 670000, .max = 699999, .len = 7 }, + .{ .min = 600000, .max = 657999, .len = 0 }, + .{ .min = 658000, .max = 699999, .len = 7 }, .{ .min = 700000, .max = 999999, .len = 4 }, .{ .min = 1000000, .max = 3979999, .len = 3 }, .{ .min = 3980000, .max = 5499999, .len = 4 }, @@ -506,8 +503,8 @@ pub const groups: []const Group = &.{ .{ .min = 500000, .max = 1999999, .len = 0 }, .{ .min = 2000000, .max = 2499999, .len = 3 }, .{ .min = 2500000, .max = 4849999, .len = 0 }, - .{ .min = 4850000, .max = 6899999, .len = 4 }, - .{ .min = 6900000, .max = 9099999, .len = 0 }, + .{ .min = 4850000, .max = 7199999, .len = 4 }, + .{ .min = 7200000, .max = 9099999, .len = 0 }, .{ .min = 9100000, .max = 9999999, .len = 5 }, }, }, @@ -547,12 +544,12 @@ pub const groups: []const Group = &.{ .{ .min = 0, .max = 2799999, .len = 0 }, .{ .min = 2800000, .max = 3199999, .len = 2 }, .{ .min = 3200000, .max = 4999999, .len = 0 }, - .{ .min = 5000000, .max = 5349999, .len = 3 }, - .{ .min = 5350000, .max = 7399999, .len = 0 }, - .{ .min = 7400000, .max = 7999999, .len = 4 }, + .{ .min = 5000000, .max = 5499999, .len = 3 }, + .{ .min = 5500000, .max = 7199999, .len = 0 }, + .{ .min = 7200000, .max = 7999999, .len = 4 }, .{ .min = 8000000, .max = 9449999, .len = 0 }, - .{ .min = 9450000, .max = 9514999, .len = 5 }, - .{ .min = 9515000, .max = 9999999, .len = 0 }, + .{ .min = 9450000, .max = 9554999, .len = 5 }, + .{ .min = 9555000, .max = 9999999, .len = 0 }, }, }, .{ @@ -723,7 +720,9 @@ pub const groups: []const Group = &.{ .ean = 978, .digits = "81", .rules = &.{ - .{ .min = 0, .max = 1899999, .len = 2 }, + .{ .min = 0, .max = 1699999, .len = 2 }, + .{ .min = 1700000, .max = 1799999, .len = 5 }, + .{ .min = 1800000, .max = 1899999, .len = 6 }, .{ .min = 1900000, .max = 1999999, .len = 5 }, .{ .min = 2000000, .max = 6479999, .len = 3 }, .{ .min = 6480000, .max = 6699999, .len = 4 }, @@ -1713,8 +1712,8 @@ pub const groups: []const Group = &.{ .{ .min = 4000000, .max = 4499999, .len = 2 }, .{ .min = 4500000, .max = 7499999, .len = 0 }, .{ .min = 7500000, .max = 7999999, .len = 3 }, - .{ .min = 8000000, .max = 9799999, .len = 0 }, - .{ .min = 9800000, .max = 9999999, .len = 4 }, + .{ .min = 8000000, .max = 9699999, .len = 0 }, + .{ .min = 9700000, .max = 9999999, .len = 4 }, }, }, .{ @@ -3063,7 +3062,9 @@ pub const groups: []const Group = &.{ .ean = 978, .digits = "99952", .rules = &.{ - .{ .min = 0, .max = 4999999, .len = 1 }, + .{ .min = 0, .max = 3999999, .len = 1 }, + .{ .min = 4000000, .max = 4299999, .len = 2 }, + .{ .min = 4300000, .max = 4999999, .len = 3 }, .{ .min = 5000000, .max = 7999999, .len = 2 }, .{ .min = 8000000, .max = 9999999, .len = 3 }, }, @@ -3441,9 +3442,11 @@ pub const groups: []const Group = &.{ .digits = "99989", .rules = &.{ .{ .min = 0, .max = 1999999, .len = 1 }, - .{ .min = 2000000, .max = 4999999, .len = 0 }, + .{ .min = 2000000, .max = 4499999, .len = 0 }, + .{ .min = 4500000, .max = 4999999, .len = 2 }, .{ .min = 5000000, .max = 7999999, .len = 2 }, - .{ .min = 8000000, .max = 8999999, .len = 0 }, + .{ .min = 8000000, .max = 8749999, .len = 0 }, + .{ .min = 8750000, .max = 8999999, .len = 3 }, .{ .min = 9000000, .max = 9999999, .len = 3 }, }, }, @@ -3601,7 +3604,8 @@ pub const groups: []const Group = &.{ .rules = &.{ .{ .min = 0, .max = 299999, .len = 0 }, .{ .min = 300000, .max = 349999, .len = 3 }, - .{ .min = 350000, .max = 1699999, .len = 0 }, + .{ .min = 350000, .max = 1599999, .len = 0 }, + .{ .min = 1600000, .max = 1699999, .len = 4 }, .{ .min = 1700000, .max = 1799999, .len = 4 }, .{ .min = 1800000, .max = 1949999, .len = 4 }, .{ .min = 1950000, .max = 1999999, .len = 4 }, @@ -3612,9 +3616,11 @@ pub const groups: []const Group = &.{ .{ .min = 3000000, .max = 8849999, .len = 4 }, .{ .min = 8850000, .max = 8999999, .len = 5 }, .{ .min = 9000000, .max = 9099999, .len = 5 }, - .{ .min = 9100000, .max = 9499999, .len = 0 }, + .{ .min = 9100000, .max = 9449999, .len = 0 }, + .{ .min = 9450000, .max = 9499999, .len = 5 }, .{ .min = 9500000, .max = 9699999, .len = 6 }, - .{ .min = 9700000, .max = 9849999, .len = 0 }, + .{ .min = 9700000, .max = 9819999, .len = 0 }, + .{ .min = 9820000, .max = 9849999, .len = 7 }, .{ .min = 9850000, .max = 9929999, .len = 7 }, .{ .min = 9930000, .max = 9959999, .len = 7 }, .{ .min = 9960000, .max = 9984999, .len = 7 }, -- 2.51.2