From 58af39d5b263e627afab1aad1246df37cce0351a Mon Sep 17 00:00:00 2001 From: Thomas Munro Date: Sun, 12 Apr 2026 20:14:34 +1200 Subject: [PATCH v2] contrib/isb: Update ISBN.h automatically. Since these tables of data evolve over time, provide a script to update them from the authoritative source. They control the placement of the hyphen between the publisher number and the publisher's serial number when displaying ISBN numbers. Discussion: https://postgr.es/m/CA+hUKG+-2=tq15fLm=MbJhCTA=i-XJ=ZDMWjiWUg_eGH9cfP2Q@mail.gmail.com --- contrib/isn/ISBN.h | 1686 ++++++++++++++++++++++++++++++++---- contrib/isn/update_isbn.py | 109 +++ 2 files changed, 1613 insertions(+), 182 deletions(-) create mode 100644 contrib/isn/update_isbn.py diff --git a/contrib/isn/ISBN.h b/contrib/isn/ISBN.h index 30002899893..01d44b28c6a 100644 --- a/contrib/isn/ISBN.h +++ b/contrib/isn/ISBN.h @@ -30,72 +30,171 @@ /* * For ISBN with prefix 978 - * Range Table as of 2010-Jul-29 */ /* where the digit set begins, and how many of them are in the table */ static const unsigned ISBN_index[10][2] = { - {0, 6}, - {6, 6}, - {12, 8}, - {20, 14}, - {34, 6}, - {40, 19}, - {59, 68}, - {127, 5}, - {132, 60}, - {192, 718}, + /* @BEGIN index:978@ */ + {0, 21}, + {21, 51}, + {72, 19}, + {91, 19}, + {110, 6}, + {116, 26}, + {142, 185}, + {327, 5}, + {332, 106}, + {438, 1184}, + /* @END@ */ }; static const char *ISBN_range[][2] = { + /* @BEGIN table:978@ */ + /* Source: International ISBN Agency */ + /* Fetched: Sun, 12 Apr 2026 05:17:21 BST */ + + /* English language */ {"0-00", "0-19"}, - {"0-200", "0-699"}, + {"0-200", "0-227"}, + {"0-2280", "0-2289"}, + {"0-229", "0-368"}, + {"0-3690", "0-3699"}, + {"0-370", "0-638"}, + {"0-6390", "0-6397"}, + {"0-6398000", "0-6399999"}, + {"0-640", "0-644"}, + {"0-6450000", "0-6459999"}, + {"0-646", "0-647"}, + {"0-6480000", "0-6489999"}, + {"0-649", "0-654"}, + {"0-6550", "0-6559"}, + {"0-656", "0-699"}, {"0-7000", "0-8499"}, {"0-85000", "0-89999"}, - {"0-900000", "0-949999"}, + {"0-900000", "0-900370"}, + {"0-9003710", "0-9003719"}, + {"0-900372", "0-949999"}, {"0-9500000", "0-9999999"}, - {"1-00", "1-09"}, - {"1-100", "1-399"}, - {"1-4000", "1-5499"}, - {"1-55000", "1-86979"}, - {"1-869800", "1-998999"}, - {"1-9990000", "1-9999999"}, + + /* English language */ + {"1-000", "1-009"}, + {"1-01", "1-02"}, + {"1-030", "1-034"}, + {"1-0350", "1-0399"}, + {"1-040", "1-047"}, + {"1-0480", "1-0499"}, + {"1-05", "1-05"}, + {"1-0666000", "1-0669999"}, + {"1-0670000", "1-0699999"}, + {"1-0700", "1-0999"}, + {"1-100", "1-397"}, + {"1-3980", "1-5499"}, + {"1-55000", "1-64999"}, + {"1-6500", "1-6799"}, + {"1-68000", "1-68599"}, + {"1-6860", "1-7139"}, + {"1-714", "1-716"}, + {"1-7170", "1-7319"}, + {"1-7320000", "1-7399999"}, + {"1-74000", "1-76199"}, + {"1-7620", "1-7634"}, + {"1-7635000", "1-7649999"}, + {"1-76500", "1-77499"}, + {"1-7750000", "1-7753999"}, + {"1-77540", "1-77639"}, + {"1-7764000", "1-7764999"}, + {"1-77650", "1-77699"}, + {"1-7770000", "1-7782999"}, + {"1-77830", "1-78999"}, + {"1-7900", "1-7999"}, + {"1-80000", "1-80049"}, + {"1-80050", "1-80499"}, + {"1-80500", "1-83799"}, + {"1-8380000", "1-8384999"}, + {"1-83850", "1-86719"}, + {"1-8672", "1-8675"}, + {"1-86760", "1-86979"}, + {"1-869800", "1-915999"}, + {"1-9160000", "1-9165059"}, + {"1-916506", "1-916869"}, + {"1-9168700", "1-9169079"}, + {"1-916908", "1-919163"}, + {"1-9191640", "1-9195649"}, + {"1-919565", "1-919599"}, + {"1-9196000", "1-9196549"}, + {"1-919655", "1-972999"}, + {"1-9730", "1-9877"}, + {"1-987800", "1-991149"}, + {"1-9911500", "1-9911999"}, + {"1-991200", "1-998989"}, + {"1-9989900", "1-9999999"}, + + /* French language */ {"2-00", "2-19"}, {"2-200", "2-349"}, {"2-35000", "2-39999"}, - {"2-400", "2-699"}, + {"2-400", "2-486"}, + {"2-487000", "2-494999"}, + {"2-495", "2-495"}, + {"2-4960", "2-4966"}, + {"2-49670", "2-49699"}, + {"2-497", "2-527"}, + {"2-5280", "2-5299"}, + {"2-530", "2-699"}, {"2-7000", "2-8399"}, {"2-84000", "2-89999"}, - {"2-900000", "2-949999"}, + {"2-900000", "2-919799"}, + {"2-91980", "2-91980"}, + {"2-919810", "2-919942"}, + {"2-9199430", "2-9199689"}, + {"2-919969", "2-949999"}, {"2-9500000", "2-9999999"}, + + /* German language */ {"3-00", "3-02"}, {"3-030", "3-033"}, {"3-0340", "3-0369"}, {"3-03700", "3-03999"}, {"3-04", "3-19"}, - {"3-200", "3-699"}, - {"3-7000", "3-8499"}, + {"3-200", "3-312"}, + {"3-3130", "3-3139"}, + {"3-314", "3-389"}, + {"3-39", "3-39"}, + {"3-400", "3-688"}, + {"3-68900", "3-69499"}, + {"3-6950", "3-8499"}, {"3-85000", "3-89999"}, {"3-900000", "3-949999"}, {"3-9500000", "3-9539999"}, {"3-95400", "3-96999"}, - {"3-9700000", "3-9899999"}, - {"3-99000", "3-99499"}, - {"3-99500", "3-99999"}, + {"3-9700000", "3-9849999"}, + {"3-98500", "3-99959"}, + {"3-9996", "3-9999"}, + + /* Japan */ {"4-00", "4-19"}, {"4-200", "4-699"}, {"4-7000", "4-8499"}, {"4-85000", "4-89999"}, {"4-900000", "4-949999"}, {"4-9500000", "4-9999999"}, - {"5-00", "5-19"}, - {"5-200", "5-420"}, + + /* former U.S.S.R */ + {"5-00000", "5-00499"}, + {"5-0050", "5-0099"}, + {"5-01", "5-19"}, + {"5-200", "5-361"}, + {"5-3620", "5-3623"}, + {"5-36240", "5-36299"}, + {"5-363", "5-420"}, {"5-4210", "5-4299"}, {"5-430", "5-430"}, {"5-4310", "5-4399"}, {"5-440", "5-440"}, {"5-4410", "5-4499"}, - {"5-450", "5-699"}, + {"5-450", "5-603"}, + {"5-6040000", "5-6049999"}, + {"5-605", "5-699"}, {"5-7000", "5-8499"}, {"5-85000", "5-89999"}, {"5-900000", "5-909999"}, @@ -107,101 +206,315 @@ static const char *ISBN_range[][2] = { {"5-98000", "5-98999"}, {"5-9900000", "5-9909999"}, {"5-9910", "5-9999"}, + + /* Iran */ {"600-00", "600-09"}, {"600-100", "600-499"}, {"600-5000", "600-8999"}, - {"600-90000", "600-99999"}, + {"600-90000", "600-98679"}, + {"600-9868", "600-9929"}, + {"600-993", "600-995"}, + {"600-99600", "600-99999"}, + + /* Kazakhstan */ {"601-00", "601-19"}, {"601-200", "601-699"}, {"601-7000", "601-7999"}, {"601-80000", "601-84999"}, {"601-85", "601-99"}, - {"602-00", "602-19"}, - {"602-200", "602-799"}, - {"602-8000", "602-9499"}, + + /* Indonesia */ + {"602-00", "602-06"}, + {"602-0700", "602-1399"}, + {"602-14000", "602-14999"}, + {"602-1500", "602-1699"}, + {"602-17000", "602-19999"}, + {"602-200", "602-499"}, + {"602-50000", "602-53999"}, + {"602-5400", "602-5999"}, + {"602-60000", "602-61999"}, + {"602-6200", "602-6999"}, + {"602-70000", "602-74999"}, + {"602-7500", "602-9499"}, {"602-95000", "602-99999"}, + + /* Saudi Arabia */ {"603-00", "603-04"}, {"603-05", "603-49"}, {"603-500", "603-799"}, {"603-8000", "603-8999"}, {"603-90000", "603-99999"}, - {"604-0", "604-4"}, + + /* Vietnam */ + {"604-0", "604-2"}, + {"604-300", "604-399"}, + {"604-40", "604-46"}, + {"604-470", "604-497"}, + {"604-4980", "604-4999"}, {"604-50", "604-89"}, {"604-900", "604-979"}, {"604-9800", "604-9999"}, - {"605-01", "605-09"}, - {"605-100", "605-399"}, + + /* Türkiye */ + {"605-00", "605-02"}, + {"605-030", "605-039"}, + {"605-04", "605-05"}, + {"605-06000", "605-06999"}, + {"605-07", "605-09"}, + {"605-100", "605-199"}, + {"605-2000", "605-2399"}, + {"605-240", "605-399"}, {"605-4000", "605-5999"}, - {"605-60000", "605-89999"}, - {"605-90", "605-99"}, - {"606-0", "606-0"}, + {"605-60000", "605-74999"}, + {"605-7500", "605-7999"}, + {"605-80000", "605-89999"}, + {"605-9000", "605-9999"}, + + /* Romania */ + {"606-000", "606-099"}, {"606-10", "606-49"}, {"606-500", "606-799"}, - {"606-8000", "606-9199"}, - {"606-92000", "606-99999"}, - {"607-00", "607-39"}, - {"607-400", "607-749"}, + {"606-8000", "606-9099"}, + {"606-910", "606-919"}, + {"606-92000", "606-95999"}, + {"606-9600", "606-9749"}, + {"606-975", "606-999"}, + + /* Mexico */ + {"607-00", "607-25"}, + {"607-2600", "607-2649"}, + {"607-26500", "607-26999"}, + {"607-27", "607-39"}, + {"607-400", "607-588"}, + {"607-5890", "607-5929"}, + {"607-59300", "607-59999"}, + {"607-600", "607-691"}, + {"607-69200", "607-69999"}, + {"607-700", "607-749"}, {"607-7500", "607-9499"}, {"607-95000", "607-99999"}, + + /* North Macedonia */ {"608-0", "608-0"}, {"608-10", "608-19"}, {"608-200", "608-449"}, {"608-4500", "608-6499"}, {"608-65000", "608-69999"}, {"608-7", "608-9"}, + + /* Lithuania */ {"609-00", "609-39"}, {"609-400", "609-799"}, {"609-8000", "609-9499"}, {"609-95000", "609-99999"}, + + /* Thailand */ + + /* Peru */ {"612-00", "612-29"}, {"612-300", "612-399"}, {"612-4000", "612-4499"}, {"612-45000", "612-49999"}, - {"612-50", "612-99"}, + {"612-5000", "612-5299"}, + {"612-99000", "612-99999"}, + + /* Mauritius */ {"613-0", "613-9"}, + + /* Lebanon */ {"614-00", "614-39"}, {"614-400", "614-799"}, {"614-8000", "614-9499"}, {"614-95000", "614-99999"}, + + /* Hungary */ {"615-00", "615-09"}, {"615-100", "615-499"}, {"615-5000", "615-7999"}, {"615-80000", "615-89999"}, + + /* Thailand */ {"616-00", "616-19"}, {"616-200", "616-699"}, {"616-7000", "616-8999"}, {"616-90000", "616-99999"}, + + /* Ukraine */ {"617-00", "617-49"}, {"617-500", "617-699"}, {"617-7000", "617-8999"}, {"617-90000", "617-99999"}, + + /* Greece */ + {"618-00", "618-19"}, + {"618-200", "618-499"}, + {"618-5000", "618-7999"}, + {"618-80000", "618-99999"}, + + /* Bulgaria */ + {"619-00", "619-14"}, + {"619-150", "619-699"}, + {"619-7000", "619-8999"}, + {"619-90000", "619-99999"}, + + /* Mauritius */ + {"620-0", "620-9"}, + + /* Philippines */ + {"621-00", "621-29"}, + {"621-400", "621-599"}, + {"621-8000", "621-8999"}, + {"621-95000", "621-99999"}, + + /* Iran */ + {"622-00", "622-10"}, + {"622-110", "622-129"}, + {"622-1300", "622-1799"}, + {"622-180", "622-181"}, + {"622-1830", "622-1899"}, + {"622-19500", "622-19999"}, + {"622-200", "622-459"}, + {"622-4600", "622-8749"}, + {"622-87500", "622-99999"}, + + /* Indonesia */ + {"623-00", "623-10"}, + {"623-110", "623-524"}, + {"623-5250", "623-8799"}, + {"623-88000", "623-99999"}, + + /* Sri Lanka */ + {"624-00", "624-04"}, + {"624-200", "624-249"}, + {"624-4850", "624-6899"}, + {"624-91000", "624-99999"}, + + /* Türkiye */ + {"625-00", "625-01"}, + {"625-320", "625-442"}, + {"625-44300", "625-44499"}, + {"625-445", "625-449"}, + {"625-5500", "625-7793"}, + {"625-77940", "625-77949"}, + {"625-7795", "625-8999"}, + {"625-90000", "625-99999"}, + + /* Taiwan */ + {"626-00", "626-04"}, + {"626-300", "626-499"}, + {"626-7000", "626-7999"}, + {"626-92500", "626-99999"}, + + /* Pakistan */ + {"627-28", "627-31"}, + {"627-500", "627-534"}, + {"627-7400", "627-7999"}, + {"627-94500", "627-95149"}, + + /* Colombia */ + {"628-00", "628-09"}, + {"628-500", "628-549"}, + {"628-7500", "628-8499"}, + {"628-95000", "628-99999"}, + + /* Malaysia */ + {"629-00", "629-02"}, + {"629-455", "629-499"}, + {"629-7500", "629-7999"}, + {"629-92000", "629-99999"}, + + /* Romania */ + {"630-300", "630-399"}, + {"630-6500", "630-6849"}, + {"630-95000", "630-99999"}, + + /* Argentina */ + {"631-00", "631-09"}, + {"631-300", "631-399"}, + {"631-6500", "631-7499"}, + {"631-90000", "631-99999"}, + + /* Vietnam */ + {"632-00", "632-11"}, + {"632-600", "632-679"}, + + /* Egypt */ + {"633-00", "633-01"}, + {"633-300", "633-349"}, + {"633-8250", "633-8999"}, + {"633-99500", "633-99999"}, + + /* Indonesia */ + {"634-00", "634-04"}, + {"634-200", "634-349"}, + {"634-7000", "634-7999"}, + {"634-96000", "634-99999"}, + + /* Brazil */ + {"65-00", "65-02"}, + {"65-250", "65-299"}, + {"65-300", "65-302"}, + {"65-5000", "65-6349"}, + {"65-80000", "65-81824"}, + {"65-82000", "65-89999"}, + {"65-900000", "65-902449"}, + {"65-975500", "65-999999"}, + + /* Zambia registration group */ + {"69990-50", "69990-50"}, + {"69990-997", "69990-999"}, + + /* China, People's Republic */ {"7-00", "7-09"}, {"7-100", "7-499"}, {"7-5000", "7-7999"}, {"7-80000", "7-89999"}, {"7-900000", "7-999999"}, + + /* former Czechoslovakia */ {"80-00", "80-19"}, - {"80-200", "80-699"}, + {"80-200", "80-529"}, + {"80-53000", "80-54999"}, + {"80-550", "80-689"}, + {"80-69000", "80-69999"}, {"80-7000", "80-8499"}, {"80-85000", "80-89999"}, - {"80-900000", "80-999999"}, - {"81-00", "81-19"}, - {"81-200", "81-699"}, + {"80-900000", "80-998999"}, + {"80-99900", "80-99999"}, + + /* India */ + {"81-00", "81-18"}, + {"81-19000", "81-19999"}, + {"81-200", "81-684"}, + {"81-685000", "81-689999"}, + {"81-69000", "81-69999"}, {"81-7000", "81-8499"}, {"81-85000", "81-89999"}, {"81-900000", "81-999999"}, + + /* Norway */ {"82-00", "82-19"}, - {"82-200", "82-699"}, + {"82-200", "82-689"}, + {"82-690000", "82-699999"}, {"82-7000", "82-8999"}, {"82-90000", "82-98999"}, {"82-990000", "82-999999"}, + + /* Poland */ {"83-00", "83-19"}, {"83-200", "83-599"}, {"83-60000", "83-69999"}, {"83-7000", "83-8499"}, {"83-85000", "83-89999"}, {"83-900000", "83-999999"}, - {"84-00", "84-14"}, + + /* Spain */ + {"84-00", "84-09"}, + {"84-10000", "84-10499"}, + {"84-1050", "84-1199"}, + {"84-120000", "84-129999"}, + {"84-1300", "84-1399"}, + {"84-140", "84-149"}, {"84-15000", "84-19999"}, {"84-200", "84-699"}, {"84-7000", "84-8499"}, @@ -212,34 +525,79 @@ static const char *ISBN_range[][2] = { {"84-930000", "84-949999"}, {"84-95000", "84-96999"}, {"84-9700", "84-9999"}, + + /* Brazil */ {"85-00", "85-19"}, - {"85-200", "85-599"}, + {"85-200", "85-454"}, + {"85-455000", "85-455299"}, + {"85-45530", "85-45599"}, + {"85-456", "85-528"}, + {"85-52900", "85-53199"}, + {"85-5320", "85-5339"}, + {"85-534", "85-539"}, + {"85-54000", "85-54029"}, + {"85-54030", "85-54039"}, + {"85-540400", "85-540499"}, + {"85-54050", "85-54089"}, + {"85-540900", "85-540999"}, + {"85-54100", "85-54399"}, + {"85-5440", "85-5479"}, + {"85-54800", "85-54999"}, + {"85-5500", "85-5999"}, {"85-60000", "85-69999"}, {"85-7000", "85-8499"}, {"85-85000", "85-89999"}, - {"85-900000", "85-979999"}, + {"85-900000", "85-924999"}, + {"85-92500", "85-94499"}, + {"85-9450", "85-9599"}, + {"85-96", "85-97"}, {"85-98000", "85-99999"}, + + /* former Yugoslavia */ {"86-00", "86-29"}, {"86-300", "86-599"}, {"86-6000", "86-7999"}, {"86-80000", "86-89999"}, {"86-900000", "86-999999"}, + + /* Denmark */ {"87-00", "87-29"}, {"87-400", "87-649"}, {"87-7000", "87-7999"}, {"87-85000", "87-94999"}, {"87-970000", "87-999999"}, + + /* Italy */ {"88-00", "88-19"}, - {"88-200", "88-599"}, + {"88-200", "88-311"}, + {"88-31200", "88-31499"}, + {"88-315", "88-318"}, + {"88-31900", "88-32299"}, + {"88-323", "88-326"}, + {"88-3270", "88-3389"}, + {"88-339", "88-360"}, + {"88-3610", "88-3629"}, + {"88-363", "88-548"}, + {"88-5490", "88-5549"}, + {"88-555", "88-599"}, {"88-6000", "88-8499"}, {"88-85000", "88-89999"}, - {"88-900000", "88-949999"}, - {"88-95000", "88-99999"}, + {"88-900000", "88-909999"}, + {"88-910", "88-926"}, + {"88-9270", "88-9399"}, + {"88-940000", "88-947999"}, + {"88-94800", "88-99999"}, + + /* Korea, Republic */ {"89-00", "89-24"}, {"89-250", "89-549"}, {"89-5500", "89-8499"}, {"89-85000", "89-94999"}, - {"89-950000", "89-999999"}, + {"89-950000", "89-969999"}, + {"89-97000", "89-98999"}, + {"89-990", "89-999"}, + + /* Netherlands */ {"90-00", "90-19"}, {"90-200", "90-499"}, {"90-5000", "90-6999"}, @@ -247,69 +605,227 @@ static const char *ISBN_range[][2] = { {"90-800000", "90-849999"}, {"90-8500", "90-8999"}, {"90-90", "90-90"}, - {"90-910000", "90-939999"}, {"90-94", "90-94"}, - {"90-950000", "90-999999"}, + + /* Sweden */ {"91-0", "91-1"}, {"91-20", "91-49"}, {"91-500", "91-649"}, - {"91-7000", "91-7999"}, + {"91-6850", "91-8199"}, {"91-85000", "91-94999"}, {"91-970000", "91-999999"}, + + /* International NGO Publishers and EU Organizations */ {"92-0", "92-5"}, {"92-60", "92-79"}, {"92-800", "92-899"}, {"92-9000", "92-9499"}, {"92-95000", "92-98999"}, {"92-990000", "92-999999"}, - {"93-00", "93-09"}, - {"93-100", "93-499"}, + + /* India */ + {"93-00", "93-08"}, + {"93-0900", "93-0999"}, + {"93-100", "93-469"}, + {"93-47000", "93-47999"}, + {"93-48000", "93-49999"}, {"93-5000", "93-7999"}, - {"93-80000", "93-94999"}, - {"93-950000", "93-999999"}, + {"93-80000", "93-95999"}, + {"93-960000", "93-999999"}, + + /* Netherlands */ {"94-000", "94-599"}, - {"94-6000", "94-8999"}, + {"94-6000", "94-6387"}, + {"94-638800", "94-638809"}, + {"94-63881", "94-63881"}, + {"94-638820", "94-638839"}, + {"94-63884", "94-63885"}, + {"94-638860", "94-638869"}, + {"94-63887", "94-63889"}, + {"94-6389", "94-6395"}, + {"94-639600", "94-639609"}, + {"94-63961", "94-63962"}, + {"94-639630", "94-639639"}, + {"94-63964", "94-63964"}, + {"94-639650", "94-639659"}, + {"94-63966", "94-63969"}, + {"94-6397", "94-6399"}, + {"94-640000", "94-640009"}, + {"94-64001", "94-64004"}, + {"94-640050", "94-640059"}, + {"94-64006", "94-64006"}, + {"94-640070", "94-640089"}, + {"94-64009", "94-64009"}, + {"94-6401", "94-6406"}, + {"94-640700", "94-640739"}, + {"94-64074", "94-64074"}, + {"94-640750", "94-640759"}, + {"94-64076", "94-64077"}, + {"94-640780", "94-640799"}, + {"94-6408", "94-6419"}, + {"94-64200", "94-64201"}, + {"94-642020", "94-642029"}, + {"94-64203", "94-64203"}, + {"94-642040", "94-642049"}, + {"94-64205", "94-64206"}, + {"94-642070", "94-642079"}, + {"94-64208", "94-64208"}, + {"94-642090", "94-642099"}, + {"94-6421", "94-6432"}, + {"94-64330", "94-64331"}, + {"94-643320", "94-643329"}, + {"94-64333", "94-64333"}, + {"94-643340", "94-643359"}, + {"94-64336", "94-64336"}, + {"94-643370", "94-643379"}, + {"94-64338", "94-64339"}, + {"94-6434", "94-6435"}, + {"94-643600", "94-643609"}, + {"94-64361", "94-64363"}, + {"94-643640", "94-643659"}, + {"94-64366", "94-64366"}, + {"94-643670", "94-643679"}, + {"94-64368", "94-64369"}, + {"94-6437", "94-6443"}, + {"94-644400", "94-644409"}, + {"94-64441", "94-64441"}, + {"94-644420", "94-644429"}, + {"94-64443", "94-64443"}, + {"94-644440", "94-644449"}, + {"94-64445", "94-64446"}, + {"94-644470", "94-644489"}, + {"94-64449", "94-64449"}, + {"94-6445", "94-6450"}, + {"94-64510", "94-64512"}, + {"94-645130", "94-645139"}, + {"94-64514", "94-64515"}, + {"94-645160", "94-645199"}, + {"94-6452", "94-6458"}, + {"94-645900", "94-645909"}, + {"94-64591", "94-64592"}, + {"94-645930", "94-645949"}, + {"94-64595", "94-64596"}, + {"94-645970", "94-645989"}, + {"94-64599", "94-64599"}, + {"94-6460", "94-6465"}, + {"94-646600", "94-646609"}, + {"94-64661", "94-64662"}, + {"94-646630", "94-646659"}, + {"94-64666", "94-64666"}, + {"94-646670", "94-646689"}, + {"94-64669", "94-64669"}, + {"94-6467", "94-6474"}, + {"94-64750", "94-64751"}, + {"94-647520", "94-647539"}, + {"94-64754", "94-64754"}, + {"94-647550", "94-647559"}, + {"94-64756", "94-64757"}, + {"94-647580", "94-647589"}, + {"94-64759", "94-64759"}, + {"94-6476", "94-6476"}, + {"94-647700", "94-647708"}, + {"94-64771", "94-64771"}, + {"94-647723", "94-647729"}, + {"94-64773", "94-64773"}, + {"94-647740", "94-647769"}, + {"94-64777", "94-64779"}, + {"94-647800", "94-647809"}, + {"94-64781", "94-64781"}, + {"94-647820", "94-647829"}, + {"94-64783", "94-64786"}, + {"94-647870", "94-647879"}, + {"94-64788", "94-64789"}, + {"94-6479", "94-6493"}, + {"94-649400", "94-649409"}, + {"94-64941", "94-64942"}, + {"94-649430", "94-649449"}, + {"94-64945", "94-64946"}, + {"94-649470", "94-649479"}, + {"94-64948", "94-64948"}, + {"94-649490", "94-649499"}, + {"94-6495", "94-6497"}, + {"94-64980", "94-64980"}, + {"94-649810", "94-649829"}, + {"94-64983", "94-64984"}, + {"94-649850", "94-649869"}, + {"94-64987", "94-64987"}, + {"94-649880", "94-649899"}, + {"94-6499", "94-8999"}, {"94-90000", "94-99999"}, + + /* Argentina */ {"950-00", "950-49"}, {"950-500", "950-899"}, {"950-9000", "950-9899"}, {"950-99000", "950-99999"}, + + /* Finland */ {"951-0", "951-1"}, {"951-20", "951-54"}, {"951-550", "951-889"}, {"951-8900", "951-9499"}, {"951-95000", "951-99999"}, - {"952-00", "952-19"}, + + /* Finland */ + {"952-00", "952-18"}, + {"952-19500", "952-19999"}, {"952-200", "952-499"}, {"952-5000", "952-5999"}, - {"952-60", "952-65"}, + {"952-60", "952-64"}, + {"952-65000", "952-65999"}, {"952-6600", "952-6699"}, {"952-67000", "952-69999"}, {"952-7000", "952-7999"}, {"952-80", "952-94"}, {"952-9500", "952-9899"}, {"952-99000", "952-99999"}, + + /* Croatia */ {"953-0", "953-0"}, {"953-10", "953-14"}, - {"953-150", "953-549"}, + {"953-150", "953-459"}, + {"953-46000", "953-49999"}, + {"953-500", "953-500"}, + {"953-50100", "953-50999"}, + {"953-51", "953-54"}, {"953-55000", "953-59999"}, {"953-6000", "953-9499"}, {"953-95000", "953-99999"}, + + /* Bulgaria */ {"954-00", "954-28"}, {"954-2900", "954-2999"}, {"954-300", "954-799"}, {"954-8000", "954-8999"}, {"954-90000", "954-92999"}, {"954-9300", "954-9999"}, + + /* Sri Lanka */ {"955-0000", "955-1999"}, - {"955-20", "955-49"}, + {"955-20", "955-33"}, + {"955-3400", "955-3549"}, + {"955-35500", "955-35999"}, + {"955-3600", "955-3799"}, + {"955-38000", "955-38999"}, + {"955-3900", "955-4099"}, + {"955-41000", "955-44999"}, + {"955-4500", "955-4999"}, {"955-50000", "955-54999"}, - {"955-550", "955-799"}, - {"955-8000", "955-9499"}, + {"955-550", "955-710"}, + {"955-71100", "955-71499"}, + {"955-7150", "955-9499"}, {"955-95000", "955-99999"}, - {"956-00", "956-19"}, - {"956-200", "956-699"}, + + /* Chile */ + {"956-00", "956-07"}, + {"956-08000", "956-08499"}, + {"956-09000", "956-09999"}, + {"956-10", "956-19"}, + {"956-200", "956-599"}, + {"956-6000", "956-6999"}, {"956-7000", "956-9999"}, + + /* Taiwan */ {"957-00", "957-02"}, {"957-0300", "957-0499"}, {"957-05", "957-19"}, @@ -320,15 +836,25 @@ static const char *ISBN_range[][2] = { {"957-440", "957-819"}, {"957-8200", "957-9699"}, {"957-97000", "957-99999"}, - {"958-00", "958-56"}, - {"958-57000", "958-59999"}, + + /* Colombia */ + {"958-00", "958-49"}, + {"958-500", "958-509"}, + {"958-5100", "958-5199"}, + {"958-52000", "958-53999"}, + {"958-5400", "958-5599"}, + {"958-56000", "958-59999"}, {"958-600", "958-799"}, {"958-8000", "958-9499"}, {"958-95000", "958-99999"}, + + /* Cuba */ {"959-00", "959-19"}, {"959-200", "959-699"}, {"959-7000", "959-8499"}, {"959-85000", "959-99999"}, + + /* Greece */ {"960-00", "960-19"}, {"960-200", "960-659"}, {"960-6600", "960-6899"}, @@ -338,21 +864,29 @@ static const char *ISBN_range[][2] = { {"960-93", "960-93"}, {"960-9400", "960-9799"}, {"960-98000", "960-99999"}, + + /* Slovenia */ {"961-00", "961-19"}, {"961-200", "961-599"}, {"961-6000", "961-8999"}, - {"961-90000", "961-94999"}, + {"961-90000", "961-97999"}, + + /* Hong Kong, China */ {"962-00", "962-19"}, {"962-200", "962-699"}, {"962-7000", "962-8499"}, {"962-85000", "962-86999"}, {"962-8700", "962-8999"}, {"962-900", "962-999"}, + + /* Hungary */ {"963-00", "963-19"}, {"963-200", "963-699"}, {"963-7000", "963-8499"}, {"963-85000", "963-89999"}, {"963-9000", "963-9999"}, + + /* Iran */ {"964-00", "964-14"}, {"964-150", "964-249"}, {"964-2500", "964-2999"}, @@ -361,53 +895,89 @@ static const char *ISBN_range[][2] = { {"964-90000", "964-96999"}, {"964-970", "964-989"}, {"964-9900", "964-9999"}, + + /* Israel */ {"965-00", "965-19"}, {"965-200", "965-599"}, {"965-7000", "965-7999"}, {"965-90000", "965-99999"}, - {"966-00", "966-14"}, + + /* Ukraine */ + {"966-00", "966-12"}, + {"966-130", "966-139"}, + {"966-14", "966-14"}, {"966-1500", "966-1699"}, {"966-170", "966-199"}, - {"966-2000", "966-2999"}, + {"966-2000", "966-2789"}, + {"966-279", "966-289"}, + {"966-2900", "966-2999"}, {"966-300", "966-699"}, {"966-7000", "966-8999"}, - {"966-90000", "966-99999"}, - {"967-00", "967-29"}, + {"966-90000", "966-90999"}, + {"966-910", "966-949"}, + {"966-95000", "966-97999"}, + {"966-980", "966-999"}, + + /* Malaysia */ + {"967-0000", "967-0999"}, + {"967-10000", "967-19999"}, + {"967-2000", "967-2499"}, + {"967-250", "967-254"}, + {"967-25500", "967-26999"}, + {"967-2700", "967-2799"}, + {"967-2800", "967-2999"}, {"967-300", "967-499"}, {"967-5000", "967-5999"}, {"967-60", "967-89"}, {"967-900", "967-989"}, {"967-9900", "967-9989"}, {"967-99900", "967-99999"}, + + /* Mexico */ {"968-01", "968-39"}, {"968-400", "968-499"}, {"968-5000", "968-7999"}, {"968-800", "968-899"}, {"968-9000", "968-9999"}, + + /* Pakistan */ {"969-0", "969-1"}, - {"969-20", "969-39"}, - {"969-400", "969-799"}, - {"969-8000", "969-9999"}, + {"969-20", "969-20"}, + {"969-210", "969-219"}, + {"969-2200", "969-2299"}, + {"969-23000", "969-23999"}, + {"969-24", "969-39"}, + {"969-400", "969-749"}, + {"969-7500", "969-9999"}, + + /* Mexico */ {"970-01", "970-59"}, {"970-600", "970-899"}, {"970-9000", "970-9099"}, {"970-91000", "970-96999"}, {"970-9700", "970-9999"}, + + /* Philippines */ {"971-000", "971-015"}, {"971-0160", "971-0199"}, {"971-02", "971-02"}, {"971-0300", "971-0599"}, - {"971-06", "971-09"}, - {"971-10", "971-49"}, + {"971-06", "971-49"}, {"971-500", "971-849"}, {"971-8500", "971-9099"}, - {"971-91000", "971-98999"}, + {"971-91000", "971-95999"}, + {"971-9600", "971-9699"}, + {"971-97", "971-98"}, {"971-9900", "971-9999"}, + + /* Portugal */ {"972-0", "972-1"}, {"972-20", "972-54"}, {"972-550", "972-799"}, {"972-8000", "972-9499"}, {"972-95000", "972-99999"}, + + /* Romania */ {"973-0", "973-0"}, {"973-100", "973-169"}, {"973-1700", "973-1999"}, @@ -417,33 +987,55 @@ static const char *ISBN_range[][2] = { {"973-85000", "973-88999"}, {"973-8900", "973-9499"}, {"973-95000", "973-99999"}, + + /* Thailand */ {"974-00", "974-19"}, {"974-200", "974-699"}, {"974-7000", "974-8499"}, {"974-85000", "974-89999"}, {"974-90000", "974-94999"}, {"974-9500", "974-9999"}, - {"975-00000", "975-00999"}, - {"975-01", "975-01"}, - {"975-02", "975-24"}, + + /* Türkiye */ + {"975-00000", "975-01999"}, + {"975-02", "975-23"}, + {"975-2400", "975-2499"}, {"975-250", "975-599"}, {"975-6000", "975-9199"}, {"975-92000", "975-98999"}, {"975-990", "975-999"}, + + /* Caribbean Community */ {"976-0", "976-3"}, {"976-40", "976-59"}, {"976-600", "976-799"}, {"976-8000", "976-9499"}, {"976-95000", "976-99999"}, + + /* Egypt */ {"977-00", "977-19"}, {"977-200", "977-499"}, {"977-5000", "977-6999"}, - {"977-700", "977-999"}, + {"977-700", "977-849"}, + {"977-85000", "977-87399"}, + {"977-8740", "977-8899"}, + {"977-890", "977-894"}, + {"977-8950", "977-8999"}, + {"977-90", "977-95"}, + {"977-9600", "977-9699"}, + {"977-970", "977-999"}, + + /* Nigeria */ {"978-000", "978-199"}, {"978-2000", "978-2999"}, - {"978-30000", "978-79999"}, + {"978-30000", "978-67999"}, + {"978-68", "978-68"}, + {"978-690", "978-699"}, + {"978-765", "978-799"}, {"978-8000", "978-8999"}, {"978-900", "978-999"}, + + /* Indonesia */ {"979-000", "979-099"}, {"979-1000", "979-1499"}, {"979-15000", "979-19999"}, @@ -452,18 +1044,30 @@ static const char *ISBN_range[][2] = { {"979-400", "979-799"}, {"979-8000", "979-9499"}, {"979-95000", "979-99999"}, + + /* Venezuela */ {"980-00", "980-19"}, {"980-200", "980-599"}, {"980-6000", "980-9999"}, - {"981-00", "981-11"}, - {"981-1200", "981-1999"}, - {"981-200", "981-289"}, - {"981-2900", "981-9999"}, + + /* Singapore */ + {"981-00", "981-16"}, + {"981-17000", "981-17999"}, + {"981-18", "981-19"}, + {"981-200", "981-299"}, + {"981-3000", "981-3099"}, + {"981-310", "981-399"}, + {"981-4000", "981-5999"}, + {"981-92", "981-99"}, + + /* South Pacific */ {"982-00", "982-09"}, {"982-100", "982-699"}, {"982-70", "982-89"}, {"982-9000", "982-9799"}, {"982-98000", "982-99999"}, + + /* Malaysia */ {"983-00", "983-01"}, {"983-020", "983-199"}, {"983-2000", "983-3999"}, @@ -473,95 +1077,318 @@ static const char *ISBN_range[][2] = { {"983-800", "983-899"}, {"983-9000", "983-9899"}, {"983-99000", "983-99999"}, - {"984-00", "984-39"}, + + /* Bangladesh */ + {"984-00", "984-21"}, + {"984-220", "984-224"}, + {"984-2250", "984-2599"}, + {"984-26", "984-28"}, + {"984-29000", "984-29999"}, + {"984-30", "984-38"}, + {"984-3900", "984-3999"}, {"984-400", "984-799"}, {"984-8000", "984-8999"}, {"984-90000", "984-99999"}, + + /* Belarus */ {"985-00", "985-39"}, {"985-400", "985-599"}, - {"985-6000", "985-8999"}, + {"985-6000", "985-8799"}, + {"985-880", "985-899"}, {"985-90000", "985-99999"}, - {"986-00", "986-11"}, - {"986-120", "986-559"}, - {"986-5600", "986-7999"}, + + /* Taiwan */ + {"986-00", "986-05"}, + {"986-06000", "986-06999"}, + {"986-0700", "986-0799"}, + {"986-08", "986-11"}, + {"986-120", "986-539"}, + {"986-5400", "986-7999"}, {"986-80000", "986-99999"}, + + /* Argentina */ {"987-00", "987-09"}, {"987-1000", "987-1999"}, {"987-20000", "987-29999"}, - {"987-30", "987-49"}, - {"987-500", "987-899"}, - {"987-9000", "987-9499"}, + {"987-30", "987-35"}, + {"987-3600", "987-4199"}, + {"987-42", "987-43"}, + {"987-4400", "987-4499"}, + {"987-45000", "987-48999"}, + {"987-4900", "987-4999"}, + {"987-500", "987-824"}, + {"987-8250", "987-8279"}, + {"987-82800", "987-82999"}, + {"987-8300", "987-8499"}, + {"987-85", "987-88"}, + {"987-8900", "987-9499"}, {"987-95000", "987-99999"}, - {"988-00", "988-16"}, - {"988-17000", "988-19999"}, - {"988-200", "988-799"}, + + /* Hong Kong, China */ + {"988-00", "988-11"}, + {"988-12000", "988-19999"}, + {"988-200", "988-699"}, + {"988-70000", "988-79999"}, {"988-8000", "988-9699"}, {"988-97000", "988-99999"}, - {"989-0", "989-1"}, - {"989-20", "989-54"}, + + /* Portugal */ + {"989-0", "989-0"}, + {"989-20", "989-34"}, + {"989-35000", "989-36999"}, + {"989-37", "989-48"}, + {"989-49000", "989-49999"}, + {"989-50", "989-52"}, + {"989-53000", "989-54999"}, {"989-550", "989-799"}, {"989-8000", "989-9499"}, {"989-95000", "989-99999"}, + + /* Nepal */ + {"9905-0", "9905-0"}, + {"9905-20", "9905-23"}, + {"9905-600", "9905-624"}, + {"9905-9900", "9905-9999"}, + + /* Tajikistan */ + {"9906-20", "9906-20"}, + {"9906-700", "9906-724"}, + {"9906-9900", "9906-9999"}, + + /* Ecuador */ + {"9907-0", "9907-0"}, + {"9907-50", "9907-64"}, + {"9907-800", "9907-874"}, + {"9907-9500", "9907-9999"}, + + /* Estonia */ + {"9908-0", "9908-1"}, + {"9908-50", "9908-69"}, + {"9908-825", "9908-899"}, + {"9908-9700", "9908-9999"}, + + /* Tunisia */ + {"9909-00", "9909-19"}, + {"9909-750", "9909-849"}, + {"9909-9800", "9909-9999"}, + + /* Uzbekistan */ + {"9910-01", "9910-15"}, + {"9910-225", "9910-299"}, + {"9910-5000", "9910-5499"}, + {"9910-550", "9910-799"}, + {"9910-8000", "9910-9999"}, + + /* Montenegro */ + {"9911-20", "9911-24"}, + {"9911-550", "9911-749"}, + {"9911-9500", "9911-9999"}, + + /* Tanzania */ + {"9912-40", "9912-44"}, + {"9912-750", "9912-799"}, + {"9912-9800", "9912-9999"}, + + /* Uganda */ + {"9913-00", "9913-09"}, + {"9913-600", "9913-709"}, + {"9913-9500", "9913-9999"}, + + /* Kenya */ + {"9914-27", "9914-55"}, + {"9914-700", "9914-799"}, + {"9914-9300", "9914-9999"}, + + /* Uruguay */ + {"9915-40", "9915-59"}, + {"9915-650", "9915-799"}, + {"9915-9300", "9915-9999"}, + + /* Estonia */ + {"9916-0", "9916-0"}, + {"9916-10", "9916-39"}, + {"9916-4", "9916-5"}, + {"9916-600", "9916-789"}, + {"9916-79", "9916-91"}, + {"9916-9200", "9916-9399"}, + {"9916-94", "9916-94"}, + {"9916-9500", "9916-9999"}, + + /* Bolivia */ + {"9917-0", "9917-0"}, + {"9917-30", "9917-34"}, + {"9917-600", "9917-699"}, + {"9917-9625", "9917-9999"}, + + /* Malta */ + {"9918-0", "9918-0"}, + {"9918-20", "9918-29"}, + {"9918-600", "9918-799"}, + {"9918-9500", "9918-9999"}, + + /* Mongolia */ + {"9919-0", "9919-0"}, + {"9919-20", "9919-29"}, + {"9919-500", "9919-599"}, + {"9919-9000", "9919-9999"}, + + /* Morocco */ + {"9920-00", "9920-02"}, + {"9920-130", "9920-199"}, + {"9920-200", "9920-229"}, + {"9920-23", "9920-42"}, + {"9920-430", "9920-799"}, + {"9920-8300", "9920-8549"}, + {"9920-8550", "9920-9999"}, + + /* Kuwait */ + {"9921-0", "9921-0"}, + {"9921-30", "9921-39"}, + {"9921-700", "9921-899"}, + {"9921-9700", "9921-9999"}, + + /* Iraq */ + {"9922-20", "9922-29"}, + {"9922-5500", "9922-5999"}, + {"9922-600", "9922-799"}, + {"9922-8000", "9922-9999"}, + + /* Jordan */ + {"9923-0", "9923-0"}, + {"9923-10", "9923-69"}, + {"9923-700", "9923-899"}, + {"9923-9400", "9923-9999"}, + + /* Cambodia */ + {"9924-28", "9924-39"}, + {"9924-500", "9924-659"}, + {"9924-8950", "9924-9999"}, + + /* Cyprus */ + {"9925-0", "9925-2"}, + {"9925-30", "9925-54"}, + {"9925-550", "9925-734"}, + {"9925-7350", "9925-9999"}, + + /* Bosnia and Herzegovina */ + {"9926-0", "9926-1"}, + {"9926-20", "9926-39"}, + {"9926-400", "9926-799"}, + {"9926-8000", "9926-9999"}, + + /* Qatar */ {"9927-00", "9927-09"}, {"9927-100", "9927-399"}, {"9927-4000", "9927-4999"}, + + /* Albania */ {"9928-00", "9928-09"}, {"9928-100", "9928-399"}, {"9928-4000", "9928-4999"}, + {"9928-800", "9928-899"}, + {"9928-90", "9928-99"}, + + /* Guatemala */ {"9929-0", "9929-3"}, {"9929-40", "9929-54"}, {"9929-550", "9929-799"}, - {"9929-8000", "9929-9999"}, + {"9929-8000", "9929-9799"}, + {"9929-980", "9929-999"}, + + /* Costa Rica */ {"9930-00", "9930-49"}, {"9930-500", "9930-939"}, {"9930-9400", "9930-9999"}, - {"9931-00", "9931-29"}, - {"9931-300", "9931-899"}, + + /* Algeria */ + {"9931-00", "9931-23"}, + {"9931-240", "9931-899"}, {"9931-9000", "9931-9999"}, + + /* Lao People's Democratic Republic */ {"9932-00", "9932-39"}, {"9932-400", "9932-849"}, {"9932-8500", "9932-9999"}, + + /* Syria */ {"9933-0", "9933-0"}, {"9933-10", "9933-39"}, - {"9933-400", "9933-899"}, + {"9933-400", "9933-869"}, + {"9933-87", "9933-89"}, {"9933-9000", "9933-9999"}, + + /* Latvia */ {"9934-0", "9934-0"}, {"9934-10", "9934-49"}, {"9934-500", "9934-799"}, {"9934-8000", "9934-9999"}, + + /* Iceland */ {"9935-0", "9935-0"}, {"9935-10", "9935-39"}, {"9935-400", "9935-899"}, {"9935-9000", "9935-9999"}, + + /* Afghanistan */ {"9936-0", "9936-1"}, {"9936-20", "9936-39"}, {"9936-400", "9936-799"}, {"9936-8000", "9936-9999"}, + + /* Nepal */ {"9937-0", "9937-2"}, {"9937-30", "9937-49"}, {"9937-500", "9937-799"}, {"9937-8000", "9937-9999"}, + + /* Tunisia */ {"9938-00", "9938-79"}, {"9938-800", "9938-949"}, - {"9938-9500", "9938-9999"}, - {"9939-0", "9939-4"}, + {"9938-9500", "9938-9749"}, + {"9938-975", "9938-990"}, + {"9938-9910", "9938-9999"}, + + /* Armenia */ + {"9939-0", "9939-3"}, + {"9939-40", "9939-47"}, + {"9939-480", "9939-499"}, {"9939-50", "9939-79"}, {"9939-800", "9939-899"}, - {"9939-9000", "9939-9999"}, + {"9939-9000", "9939-9599"}, + {"9939-960", "9939-979"}, + {"9939-98", "9939-99"}, + + /* Montenegro */ {"9940-0", "9940-1"}, {"9940-20", "9940-49"}, - {"9940-500", "9940-899"}, - {"9940-9000", "9940-9999"}, + {"9940-500", "9940-839"}, + {"9940-84", "9940-86"}, + {"9940-8700", "9940-9999"}, + + /* Georgia */ {"9941-0", "9941-0"}, {"9941-10", "9941-39"}, - {"9941-400", "9941-899"}, + {"9941-400", "9941-789"}, + {"9941-7900", "9941-7999"}, + {"9941-8", "9941-8"}, {"9941-9000", "9941-9999"}, - {"9942-00", "9942-89"}, - {"9942-900", "9942-994"}, - {"9942-9950", "9942-9999"}, + + /* Ecuador */ + {"9942-00", "9942-55"}, + {"9942-560", "9942-699"}, + {"9942-7000", "9942-7499"}, + {"9942-750", "9942-849"}, + {"9942-8500", "9942-8999"}, + {"9942-900", "9942-984"}, + {"9942-9850", "9942-9999"}, + + /* Uzbekistan */ {"9943-00", "9943-29"}, {"9943-300", "9943-399"}, - {"9943-4000", "9943-9999"}, + {"9943-4000", "9943-9749"}, + {"9943-975", "9943-999"}, + + /* Türkiye */ {"9944-0000", "9944-0999"}, {"9944-100", "9944-499"}, {"9944-5000", "9944-5999"}, @@ -569,107 +1396,195 @@ static const char *ISBN_range[][2] = { {"9944-700", "9944-799"}, {"9944-80", "9944-89"}, {"9944-900", "9944-999"}, + + /* Dominican Republic */ {"9945-00", "9945-00"}, {"9945-010", "9945-079"}, {"9945-08", "9945-39"}, {"9945-400", "9945-569"}, {"9945-57", "9945-57"}, - {"9945-580", "9945-849"}, + {"9945-580", "9945-799"}, + {"9945-80", "9945-80"}, + {"9945-810", "9945-849"}, {"9945-8500", "9945-9999"}, + + /* Korea, P.D.R. */ {"9946-0", "9946-1"}, {"9946-20", "9946-39"}, {"9946-400", "9946-899"}, {"9946-9000", "9946-9999"}, + + /* Algeria */ {"9947-0", "9947-1"}, {"9947-20", "9947-79"}, {"9947-800", "9947-999"}, + + /* United Arab Emirates */ {"9948-00", "9948-39"}, {"9948-400", "9948-849"}, {"9948-8500", "9948-9999"}, - {"9949-0", "9949-0"}, + + /* Estonia */ + {"9949-00", "9949-08"}, + {"9949-090", "9949-099"}, {"9949-10", "9949-39"}, - {"9949-400", "9949-899"}, + {"9949-400", "9949-699"}, + {"9949-70", "9949-71"}, + {"9949-7200", "9949-7499"}, + {"9949-75", "9949-89"}, {"9949-9000", "9949-9999"}, + + /* Palestine */ {"9950-00", "9950-29"}, {"9950-300", "9950-849"}, {"9950-8500", "9950-9999"}, - {"9951-00", "9951-39"}, - {"9951-400", "9951-849"}, - {"9951-8500", "9951-9999"}, - {"9952-0", "9952-1"}, - {"9952-20", "9952-39"}, + + /* Kosova */ + {"9951-00", "9951-38"}, + {"9951-390", "9951-849"}, + {"9951-8500", "9951-9799"}, + {"9951-980", "9951-999"}, + + /* Azerbaijan */ + {"9952-0", "9952-0"}, + {"9952-15", "9952-39"}, {"9952-400", "9952-799"}, {"9952-8000", "9952-9999"}, + + /* Lebanon */ {"9953-0", "9953-0"}, {"9953-10", "9953-39"}, {"9953-400", "9953-599"}, {"9953-60", "9953-89"}, - {"9953-9000", "9953-9999"}, + {"9953-9000", "9953-9299"}, + {"9953-93", "9953-96"}, + {"9953-970", "9953-999"}, + + /* Morocco */ {"9954-0", "9954-1"}, {"9954-20", "9954-39"}, {"9954-400", "9954-799"}, - {"9954-8000", "9954-9999"}, + {"9954-8000", "9954-9899"}, + {"9954-99", "9954-99"}, + + /* Lithuania */ {"9955-00", "9955-39"}, {"9955-400", "9955-929"}, {"9955-9300", "9955-9999"}, + + /* Cameroon */ {"9956-0", "9956-0"}, {"9956-10", "9956-39"}, {"9956-400", "9956-899"}, {"9956-9000", "9956-9999"}, + + /* Jordan */ {"9957-00", "9957-39"}, - {"9957-400", "9957-699"}, + {"9957-400", "9957-649"}, + {"9957-65", "9957-67"}, + {"9957-680", "9957-699"}, {"9957-70", "9957-84"}, {"9957-8500", "9957-8799"}, {"9957-88", "9957-99"}, - {"9958-0", "9958-0"}, - {"9958-10", "9958-49"}, + + /* Bosnia and Herzegovina */ + {"9958-00", "9958-01"}, + {"9958-020", "9958-029"}, + {"9958-0300", "9958-0399"}, + {"9958-040", "9958-089"}, + {"9958-0900", "9958-0999"}, + {"9958-10", "9958-18"}, + {"9958-1900", "9958-1999"}, + {"9958-20", "9958-49"}, {"9958-500", "9958-899"}, {"9958-9000", "9958-9999"}, + + /* Libya */ {"9959-0", "9959-1"}, {"9959-20", "9959-79"}, {"9959-800", "9959-949"}, - {"9959-9500", "9959-9999"}, + {"9959-9500", "9959-9699"}, + {"9959-970", "9959-979"}, + {"9959-98", "9959-99"}, + + /* Saudi Arabia */ {"9960-00", "9960-59"}, {"9960-600", "9960-899"}, {"9960-9000", "9960-9999"}, + + /* Algeria */ {"9961-0", "9961-2"}, {"9961-30", "9961-69"}, {"9961-700", "9961-949"}, {"9961-9500", "9961-9999"}, + + /* Panama */ {"9962-00", "9962-54"}, {"9962-5500", "9962-5599"}, {"9962-56", "9962-59"}, {"9962-600", "9962-849"}, {"9962-8500", "9962-9999"}, - {"9963-0", "9963-2"}, + + /* Cyprus */ + {"9963-0", "9963-1"}, + {"9963-2000", "9963-2499"}, + {"9963-250", "9963-279"}, + {"9963-2800", "9963-2999"}, {"9963-30", "9963-54"}, {"9963-550", "9963-734"}, {"9963-7350", "9963-7499"}, {"9963-7500", "9963-9999"}, + + /* Ghana */ {"9964-0", "9964-6"}, {"9964-70", "9964-94"}, {"9964-950", "9964-999"}, + + /* Kazakhstan */ {"9965-00", "9965-39"}, {"9965-400", "9965-899"}, {"9965-9000", "9965-9999"}, - {"9966-000", "9966-199"}, + + /* Kenya */ + {"9966-000", "9966-139"}, + {"9966-14", "9966-14"}, + {"9966-1500", "9966-1999"}, {"9966-20", "9966-69"}, {"9966-7000", "9966-7499"}, - {"9966-750", "9966-959"}, + {"9966-750", "9966-820"}, + {"9966-8210", "9966-8249"}, + {"9966-825", "9966-825"}, + {"9966-8260", "9966-8289"}, + {"9966-829", "9966-959"}, {"9966-9600", "9966-9999"}, + + /* Kyrgyz Republic */ {"9967-00", "9967-39"}, {"9967-400", "9967-899"}, {"9967-9000", "9967-9999"}, + + /* Costa Rica */ {"9968-00", "9968-49"}, {"9968-500", "9968-939"}, {"9968-9400", "9968-9999"}, + + /* Algeria */ + {"9969-00", "9969-19"}, + {"9969-500", "9969-749"}, + {"9969-9300", "9969-9999"}, + + /* Uganda */ {"9970-00", "9970-39"}, {"9970-400", "9970-899"}, {"9970-9000", "9970-9999"}, + + /* Singapore */ {"9971-0", "9971-5"}, {"9971-60", "9971-89"}, {"9971-900", "9971-989"}, {"9971-9900", "9971-9999"}, + + /* Peru */ {"9972-00", "9972-09"}, {"9972-1", "9972-1"}, {"9972-200", "9972-249"}, @@ -677,314 +1592,721 @@ static const char *ISBN_range[][2] = { {"9972-30", "9972-59"}, {"9972-600", "9972-899"}, {"9972-9000", "9972-9999"}, + + /* Tunisia */ {"9973-00", "9973-05"}, {"9973-060", "9973-089"}, {"9973-0900", "9973-0999"}, {"9973-10", "9973-69"}, {"9973-700", "9973-969"}, {"9973-9700", "9973-9999"}, + + /* Uruguay */ {"9974-0", "9974-2"}, {"9974-30", "9974-54"}, {"9974-550", "9974-749"}, - {"9974-7500", "9974-9499"}, + {"9974-7500", "9974-8799"}, + {"9974-880", "9974-909"}, + {"9974-91", "9974-94"}, {"9974-95", "9974-99"}, + + /* Moldova */ {"9975-0", "9975-0"}, - {"9975-100", "9975-399"}, + {"9975-100", "9975-299"}, + {"9975-3000", "9975-3999"}, {"9975-4000", "9975-4499"}, {"9975-45", "9975-89"}, {"9975-900", "9975-949"}, {"9975-9500", "9975-9999"}, - {"9976-0", "9976-5"}, - {"9976-60", "9976-89"}, + + /* Tanzania */ + {"9976-0", "9976-4"}, + {"9976-5000", "9976-5799"}, + {"9976-580", "9976-589"}, + {"9976-59", "9976-89"}, {"9976-900", "9976-989"}, {"9976-9900", "9976-9999"}, + + /* Costa Rica */ {"9977-00", "9977-89"}, {"9977-900", "9977-989"}, {"9977-9900", "9977-9999"}, + + /* Ecuador */ {"9978-00", "9978-29"}, {"9978-300", "9978-399"}, {"9978-40", "9978-94"}, {"9978-950", "9978-989"}, {"9978-9900", "9978-9999"}, + + /* Iceland */ {"9979-0", "9979-4"}, {"9979-50", "9979-64"}, {"9979-650", "9979-659"}, {"9979-66", "9979-75"}, {"9979-760", "9979-899"}, {"9979-9000", "9979-9999"}, + + /* Papua New Guinea */ {"9980-0", "9980-3"}, {"9980-40", "9980-89"}, {"9980-900", "9980-989"}, {"9980-9900", "9980-9999"}, + + /* Morocco */ {"9981-00", "9981-09"}, {"9981-100", "9981-159"}, {"9981-1600", "9981-1999"}, {"9981-20", "9981-79"}, {"9981-800", "9981-949"}, {"9981-9500", "9981-9999"}, + + /* Zambia */ {"9982-00", "9982-79"}, {"9982-800", "9982-989"}, {"9982-9900", "9982-9999"}, + + /* Gambia */ {"9983-80", "9983-94"}, {"9983-950", "9983-989"}, {"9983-9900", "9983-9999"}, + + /* Latvia */ {"9984-00", "9984-49"}, {"9984-500", "9984-899"}, {"9984-9000", "9984-9999"}, + + /* Estonia */ {"9985-0", "9985-4"}, {"9985-50", "9985-79"}, {"9985-800", "9985-899"}, {"9985-9000", "9985-9999"}, + + /* Lithuania */ {"9986-00", "9986-39"}, {"9986-400", "9986-899"}, {"9986-9000", "9986-9399"}, {"9986-940", "9986-969"}, {"9986-97", "9986-99"}, + + /* Tanzania */ {"9987-00", "9987-39"}, {"9987-400", "9987-879"}, {"9987-8800", "9987-9999"}, - {"9988-0", "9988-2"}, - {"9988-30", "9988-54"}, + + /* Ghana */ + {"9988-0", "9988-3"}, + {"9988-40", "9988-54"}, {"9988-550", "9988-749"}, {"9988-7500", "9988-9999"}, + + /* North Macedonia */ {"9989-0", "9989-0"}, {"9989-100", "9989-199"}, {"9989-2000", "9989-2999"}, {"9989-30", "9989-59"}, {"9989-600", "9989-949"}, {"9989-9500", "9989-9999"}, + + /* Bahrain */ {"99901-00", "99901-49"}, {"99901-500", "99901-799"}, {"99901-80", "99901-99"}, + + /* Reserved Agency */ + + /* Mauritius */ {"99903-0", "99903-1"}, {"99903-20", "99903-89"}, {"99903-900", "99903-999"}, + + /* Curaçao */ {"99904-0", "99904-5"}, {"99904-60", "99904-89"}, {"99904-900", "99904-999"}, + + /* Bolivia */ {"99905-0", "99905-3"}, {"99905-40", "99905-79"}, {"99905-800", "99905-999"}, + + /* Kuwait */ {"99906-0", "99906-2"}, {"99906-30", "99906-59"}, {"99906-600", "99906-699"}, {"99906-70", "99906-89"}, {"99906-90", "99906-94"}, {"99906-950", "99906-999"}, + + /* Malawi */ {"99908-0", "99908-0"}, {"99908-10", "99908-89"}, {"99908-900", "99908-999"}, + + /* Malta */ {"99909-0", "99909-3"}, {"99909-40", "99909-94"}, {"99909-950", "99909-999"}, + + /* Sierra Leone */ {"99910-0", "99910-2"}, {"99910-30", "99910-89"}, {"99910-900", "99910-999"}, + + /* Lesotho */ {"99911-00", "99911-59"}, {"99911-600", "99911-999"}, + + /* Botswana */ {"99912-0", "99912-3"}, {"99912-400", "99912-599"}, {"99912-60", "99912-89"}, {"99912-900", "99912-999"}, + + /* Andorra */ {"99913-0", "99913-2"}, {"99913-30", "99913-35"}, {"99913-600", "99913-604"}, + + /* International NGO Publishers */ {"99914-0", "99914-4"}, - {"99914-50", "99914-89"}, + {"99914-50", "99914-69"}, + {"99914-7", "99914-7"}, + {"99914-80", "99914-86"}, + {"99914-870", "99914-879"}, + {"99914-88", "99914-89"}, {"99914-900", "99914-999"}, + + /* Maldives */ {"99915-0", "99915-4"}, {"99915-50", "99915-79"}, {"99915-800", "99915-999"}, + + /* Namibia */ {"99916-0", "99916-2"}, {"99916-30", "99916-69"}, {"99916-700", "99916-999"}, + + /* Brunei Darussalam */ {"99917-0", "99917-2"}, - {"99917-30", "99917-89"}, - {"99917-900", "99917-999"}, + {"99917-30", "99917-88"}, + {"99917-890", "99917-999"}, + + /* Faroe Islands */ {"99918-0", "99918-3"}, {"99918-40", "99918-79"}, {"99918-800", "99918-999"}, + + /* Benin */ {"99919-0", "99919-2"}, {"99919-300", "99919-399"}, - {"99919-40", "99919-69"}, - {"99919-900", "99919-999"}, + {"99919-40", "99919-79"}, + {"99919-800", "99919-999"}, + + /* Andorra */ {"99920-0", "99920-4"}, {"99920-50", "99920-89"}, {"99920-900", "99920-999"}, + + /* Qatar */ {"99921-0", "99921-1"}, {"99921-20", "99921-69"}, {"99921-700", "99921-799"}, {"99921-8", "99921-8"}, {"99921-90", "99921-99"}, + + /* Guatemala */ {"99922-0", "99922-3"}, {"99922-40", "99922-69"}, {"99922-700", "99922-999"}, + + /* El Salvador */ {"99923-0", "99923-1"}, {"99923-20", "99923-79"}, {"99923-800", "99923-999"}, + + /* Nicaragua */ {"99924-0", "99924-1"}, {"99924-20", "99924-79"}, {"99924-800", "99924-999"}, - {"99925-0", "99925-3"}, + + /* Paraguay */ + {"99925-0", "99925-0"}, + {"99925-10", "99925-19"}, + {"99925-200", "99925-299"}, + {"99925-3", "99925-3"}, {"99925-40", "99925-79"}, {"99925-800", "99925-999"}, + + /* Honduras */ {"99926-0", "99926-0"}, {"99926-10", "99926-59"}, - {"99926-600", "99926-999"}, + {"99926-600", "99926-869"}, + {"99926-87", "99926-89"}, + {"99926-90", "99926-99"}, + + /* Albania */ {"99927-0", "99927-2"}, {"99927-30", "99927-59"}, {"99927-600", "99927-999"}, + + /* Georgia */ {"99928-0", "99928-0"}, {"99928-10", "99928-79"}, {"99928-800", "99928-999"}, + + /* Mongolia */ {"99929-0", "99929-4"}, {"99929-50", "99929-79"}, {"99929-800", "99929-999"}, + + /* Armenia */ {"99930-0", "99930-4"}, {"99930-50", "99930-79"}, {"99930-800", "99930-999"}, + + /* Seychelles */ {"99931-0", "99931-4"}, {"99931-50", "99931-79"}, {"99931-800", "99931-999"}, + + /* Malta */ {"99932-0", "99932-0"}, {"99932-10", "99932-59"}, {"99932-600", "99932-699"}, {"99932-7", "99932-7"}, {"99932-80", "99932-99"}, + + /* Nepal */ {"99933-0", "99933-2"}, {"99933-30", "99933-59"}, {"99933-600", "99933-999"}, + + /* Dominican Republic */ {"99934-0", "99934-1"}, {"99934-20", "99934-79"}, {"99934-800", "99934-999"}, + + /* Haiti */ {"99935-0", "99935-2"}, {"99935-30", "99935-59"}, {"99935-600", "99935-699"}, {"99935-7", "99935-8"}, {"99935-90", "99935-99"}, + + /* Bhutan */ {"99936-0", "99936-0"}, {"99936-10", "99936-59"}, {"99936-600", "99936-999"}, + + /* Macau */ {"99937-0", "99937-1"}, {"99937-20", "99937-59"}, {"99937-600", "99937-999"}, + + /* Srpska, Republic of */ {"99938-0", "99938-1"}, {"99938-20", "99938-59"}, {"99938-600", "99938-899"}, {"99938-90", "99938-99"}, - {"99939-0", "99939-5"}, + + /* Guatemala */ + {"99939-0", "99939-2"}, + {"99939-30", "99939-59"}, {"99939-60", "99939-89"}, {"99939-900", "99939-999"}, + + /* Georgia */ {"99940-0", "99940-0"}, {"99940-10", "99940-69"}, {"99940-700", "99940-999"}, + + /* Armenia */ {"99941-0", "99941-2"}, {"99941-30", "99941-79"}, {"99941-800", "99941-999"}, + + /* Sudan */ {"99942-0", "99942-4"}, {"99942-50", "99942-79"}, {"99942-800", "99942-999"}, + + /* Albania */ {"99943-0", "99943-2"}, {"99943-30", "99943-59"}, {"99943-600", "99943-999"}, + + /* Ethiopia */ {"99944-0", "99944-4"}, {"99944-50", "99944-79"}, {"99944-800", "99944-999"}, - {"99945-0", "99945-5"}, - {"99945-60", "99945-89"}, - {"99945-900", "99945-999"}, + + /* Namibia */ + {"99945-0", "99945-4"}, + {"99945-50", "99945-89"}, + {"99945-900", "99945-979"}, + {"99945-98", "99945-99"}, + + /* Nepal */ {"99946-0", "99946-2"}, {"99946-30", "99946-59"}, {"99946-600", "99946-999"}, + + /* Tajikistan */ {"99947-0", "99947-2"}, {"99947-30", "99947-69"}, {"99947-700", "99947-999"}, + + /* Eritrea */ {"99948-0", "99948-4"}, {"99948-50", "99948-79"}, {"99948-800", "99948-999"}, + + /* Mauritius */ {"99949-0", "99949-1"}, - {"99949-20", "99949-89"}, - {"99949-900", "99949-999"}, + {"99949-20", "99949-79"}, + {"99949-8", "99949-8"}, + {"99949-900", "99949-989"}, + {"99949-99", "99949-99"}, + + /* Cambodia */ {"99950-0", "99950-4"}, {"99950-50", "99950-79"}, {"99950-800", "99950-999"}, + + /* Reserved Agency */ + + /* Mali */ {"99952-0", "99952-4"}, {"99952-50", "99952-79"}, {"99952-800", "99952-999"}, + + /* Paraguay */ {"99953-0", "99953-2"}, {"99953-30", "99953-79"}, {"99953-800", "99953-939"}, {"99953-94", "99953-99"}, + + /* Bolivia */ {"99954-0", "99954-2"}, {"99954-30", "99954-69"}, - {"99954-700", "99954-999"}, + {"99954-700", "99954-879"}, + {"99954-88", "99954-99"}, + + /* Srpska, Republic of */ {"99955-0", "99955-1"}, {"99955-20", "99955-59"}, {"99955-600", "99955-799"}, - {"99955-80", "99955-89"}, - {"99955-90", "99955-99"}, + {"99955-80", "99955-99"}, + + /* Albania */ {"99956-00", "99956-59"}, {"99956-600", "99956-859"}, {"99956-86", "99956-99"}, + + /* Malta */ {"99957-0", "99957-1"}, {"99957-20", "99957-79"}, - {"99957-800", "99957-999"}, + {"99957-800", "99957-949"}, + {"99957-95", "99957-99"}, + + /* Bahrain */ {"99958-0", "99958-4"}, - {"99958-50", "99958-94"}, + {"99958-50", "99958-93"}, + {"99958-940", "99958-949"}, {"99958-950", "99958-999"}, + + /* Luxembourg */ {"99959-0", "99959-2"}, {"99959-30", "99959-59"}, {"99959-600", "99959-999"}, - {"99960-0", "99960-0"}, + + /* Malawi */ + {"99960-070", "99960-099"}, {"99960-10", "99960-94"}, {"99960-950", "99960-999"}, - {"99961-0", "99961-3"}, - {"99961-40", "99961-89"}, + + /* El Salvador */ + {"99961-0", "99961-2"}, + {"99961-300", "99961-369"}, + {"99961-37", "99961-89"}, {"99961-900", "99961-999"}, + + /* Mongolia */ {"99962-0", "99962-4"}, {"99962-50", "99962-79"}, {"99962-800", "99962-999"}, + + /* Cambodia */ {"99963-00", "99963-49"}, - {"99963-500", "99963-999"}, + {"99963-500", "99963-919"}, + {"99963-92", "99963-99"}, + + /* Nicaragua */ {"99964-0", "99964-1"}, {"99964-20", "99964-79"}, {"99964-800", "99964-999"}, - {"99965-0", "99965-3"}, - {"99965-40", "99965-79"}, - {"99965-800", "99965-999"}, + + /* Macau */ + {"99965-0", "99965-2"}, + {"99965-300", "99965-359"}, + {"99965-36", "99965-62"}, + {"99965-630", "99965-999"}, + + /* Kuwait */ {"99966-0", "99966-2"}, {"99966-30", "99966-69"}, {"99966-700", "99966-799"}, - {"99967-0", "99967-1"}, - {"99967-20", "99967-59"}, - {"99967-600", "99967-899"}, + {"99966-80", "99966-96"}, + {"99966-970", "99966-999"}, + + /* Paraguay */ + {"99967-0", "99967-0"}, + {"99967-10", "99967-59"}, + {"99967-600", "99967-999"}, + + /* Botswana */ + {"99968-0", "99968-3"}, + {"99968-400", "99968-599"}, + {"99968-60", "99968-89"}, + {"99968-900", "99968-999"}, + + /* Oman */ + {"99969-0", "99969-4"}, + {"99969-50", "99969-79"}, + {"99969-800", "99969-949"}, + {"99969-95", "99969-99"}, + + /* Haiti */ + {"99970-0", "99970-4"}, + {"99970-50", "99970-89"}, + {"99970-900", "99970-999"}, + + /* Myanmar */ + {"99971-0", "99971-3"}, + {"99971-40", "99971-84"}, + {"99971-850", "99971-999"}, + + /* Faroe Islands */ + {"99972-0", "99972-4"}, + {"99972-50", "99972-89"}, + {"99972-900", "99972-999"}, + + /* Mongolia */ + {"99973-0", "99973-3"}, + {"99973-40", "99973-79"}, + {"99973-800", "99973-999"}, + + /* Bolivia */ + {"99974-0", "99974-0"}, + {"99974-10", "99974-25"}, + {"99974-260", "99974-399"}, + {"99974-40", "99974-63"}, + {"99974-640", "99974-649"}, + {"99974-65", "99974-79"}, + {"99974-800", "99974-999"}, + + /* Tajikistan */ + {"99975-0", "99975-2"}, + {"99975-300", "99975-399"}, + {"99975-40", "99975-79"}, + {"99975-800", "99975-999"}, + + /* Srpska, Republic of */ + {"99976-00", "99976-03"}, + {"99976-040", "99976-099"}, + {"99976-10", "99976-15"}, + {"99976-160", "99976-199"}, + {"99976-20", "99976-59"}, + {"99976-600", "99976-819"}, + {"99976-82", "99976-89"}, + {"99976-900", "99976-999"}, + + /* Rwanda */ + {"99977-0", "99977-1"}, + {"99977-40", "99977-69"}, + {"99977-700", "99977-799"}, + {"99977-900", "99977-924"}, + {"99977-975", "99977-999"}, + + /* Mongolia */ + {"99978-0", "99978-4"}, + {"99978-50", "99978-69"}, + {"99978-700", "99978-999"}, + + /* Honduras */ + {"99979-0", "99979-3"}, + {"99979-40", "99979-79"}, + {"99979-800", "99979-999"}, + + /* Bhutan */ + {"99980-0", "99980-0"}, + {"99980-30", "99980-64"}, + {"99980-700", "99980-999"}, + + /* Macau */ + {"99981-0", "99981-0"}, + {"99981-10", "99981-10"}, + {"99981-110", "99981-149"}, + {"99981-15", "99981-19"}, + {"99981-200", "99981-219"}, + {"99981-22", "99981-74"}, + {"99981-750", "99981-999"}, + + /* Benin */ + {"99982-0", "99982-3"}, + {"99982-50", "99982-76"}, + {"99982-865", "99982-999"}, + + /* El Salvador */ + {"99983-0", "99983-0"}, + {"99983-35", "99983-69"}, + {"99983-850", "99983-999"}, + + /* Brunei Darussalam */ + {"99984-0", "99984-0"}, + {"99984-50", "99984-69"}, + {"99984-950", "99984-999"}, + + /* Tajikistan */ + {"99985-0", "99985-1"}, + {"99985-200", "99985-229"}, + {"99985-23", "99985-79"}, + {"99985-800", "99985-999"}, + + /* Myanmar */ + {"99986-0", "99986-0"}, + {"99986-50", "99986-69"}, + {"99986-950", "99986-999"}, + + /* Luxembourg */ + {"99987-550", "99987-999"}, + + /* Sudan */ + {"99988-0", "99988-0"}, + {"99988-10", "99988-10"}, + {"99988-50", "99988-54"}, + {"99988-800", "99988-824"}, + + /* Paraguay */ + {"99989-0", "99989-1"}, + {"99989-50", "99989-79"}, + {"99989-900", "99989-999"}, + + /* Ethiopia */ + {"99990-0", "99990-1"}, + {"99990-45", "99990-57"}, + {"99990-930", "99990-999"}, + + /* Burkina Faso */ + {"99991-0", "99991-0"}, + {"99991-50", "99991-60"}, + {"99991-960", "99991-999"}, + + /* Oman */ + {"99992-0", "99992-2"}, + {"99992-50", "99992-69"}, + {"99992-900", "99992-999"}, + + /* Mauritius */ + {"99993-0", "99993-4"}, + {"99993-50", "99993-54"}, + {"99993-980", "99993-999"}, + + /* Haiti */ + {"99994-0", "99994-0"}, + {"99994-50", "99994-56"}, + {"99994-960", "99994-999"}, + + /* Seychelles */ + {"99995-50", "99995-55"}, + {"99995-975", "99995-999"}, + + /* Macau */ + {"99996-0", "99996-1"}, + {"99996-40", "99996-59"}, + {"99996-900", "99996-999"}, + + /* Srpska, Republic of */ + {"99997-0", "99997-0"}, + {"99997-40", "99997-61"}, + {"99997-920", "99997-999"}, + + /* Namibia */ + {"99998-80", "99998-89"}, + /* @END@ */ + {NULL, NULL}, }; /* * For ISBN with prefix 979 - * Range Table as of 2010-Jul-29 */ /* where the digit set begins, and how many of them are in the table */ static const unsigned ISBN_index_new[10][2] = { + /* @BEGIN index:979@ */ + {0, 0}, + {0, 20}, + {0, 0}, + {0, 0}, + {0, 0}, {0, 0}, - {0, 5}, - {5, 0}, - {5, 0}, - {5, 0}, - {5, 0}, - {5, 0}, - {5, 0}, - {5, 0}, - {5, 0}, + {0, 0}, + {0, 0}, + {20, 13}, + {0, 0}, + /* @END@ */ }; static const char *ISBN_range_new[][2] = { + /* @BEGIN table:979@ */ + /* Source: International ISBN Agency */ + /* Fetched: Sun, 12 Apr 2026 05:17:21 BST */ + + /* France */ {"10-00", "10-19"}, {"10-200", "10-699"}, {"10-7000", "10-8999"}, {"10-90000", "10-97599"}, {"10-976000", "10-999999"}, + + /* Korea, Republic */ + {"11-00", "11-23"}, + {"11-24000", "11-24999"}, + {"11-250", "11-549"}, + {"11-5500", "11-8499"}, + {"11-85000", "11-94999"}, + {"11-950000", "11-999999"}, + + /* Italy */ + {"12-200", "12-299"}, + {"12-5450", "12-5999"}, + {"12-80000", "12-84999"}, + {"12-985000", "12-999999"}, + + /* Spain */ + {"13-00", "13-00"}, + {"13-600", "13-604"}, + {"13-7000", "13-7349"}, + {"13-87500", "13-89999"}, + {"13-990000", "13-999999"}, + + /* United States */ + {"8-1950", "8-1999"}, + {"8-200", "8-239"}, + {"8-2400", "8-2599"}, + {"8-2600", "8-2799"}, + {"8-2800", "8-2999"}, + {"8-3000", "8-8849"}, + {"8-88500", "8-89999"}, + {"8-90000", "8-90999"}, + {"8-950000", "8-969999"}, + {"8-9850000", "8-9929999"}, + {"8-9930000", "8-9959999"}, + {"8-9960000", "8-9984999"}, + {"8-9985000", "8-9999999"}, + /* @END@ */ + {NULL, NULL}, }; diff --git a/contrib/isn/update_isbn.py b/contrib/isn/update_isbn.py new file mode 100644 index 00000000000..5b44b5c18ff --- /dev/null +++ b/contrib/isn/update_isbn.py @@ -0,0 +1,109 @@ +# Update ISBN.h from primary source. + +import re +import requests +import xml.etree.ElementTree as ET + +SOURCE_URL = "https://www.isbn-international.org/export_rangemessage.xml" +GS1_PREFIXES = ("978", "979") + +def generate_table(root, gs1_prefix): + source = root.find("MessageSource").text + date = root.find("MessageDate").text + first_digit_index = [-1] * 10 + first_digit_count = [0] * 10 + table_lines = ["\t/* Source: %s */" % source, "\t/* Fetched: %s */" % date] + index = 0 + for registration_group in root.iter("RegistrationGroups"): + for group in registration_group.iter("Group"): + + # Example prefix: 978-631, first part is GS1, second part identifies one + # of several prefixes that are controlled by Argentina. + prefix = group.find("Prefix").text + prefix_split = prefix.split("-") + + # Filter out GS1 prefixes we're not interested in. + if prefix_split[0] != gs1_prefix: + continue + + # Include a comment showing which language or country each prefix + # corresponds to. + agency = group.find("Agency").text + table_lines.append("") + table_lines.append("\t/* %s */" % agency) + + # Length is where the hyphen goes between publisher number and the serial + # number assigned by the publisher. + for rule in group.iter("Rule"): + range_str = rule.find("Range").text + length = int(rule.find("Length").text) + + # Our table's way of representing ranges (ie truncating the rest of the + # digits and assuming they were /0*/ and /9*/) doesn't work for 0 but + # that seems to be OK in practice: we add no hyphen if we can't find + # the range in the table, so just skip this entry. + if length == 0: + continue + + # Maintain index of the range of table indexes for each first digit. + first_digit = int(prefix_split[1][0]) + if first_digit_index[first_digit] == -1: + first_digit_index[first_digit] = index + first_digit_count[first_digit] = 1 + elif first_digit_index[first_digit] + first_digit_count[first_digit] != index: + raise RuntimeError("input out of order: first digit %d, which began at index %d, my index %d, first_digit_index = %s, first_digit_count = %s" % (first_digit, first_digit_index[first_digit], index, first_digit_index, first_digit_count)) + else: + first_digit_count[first_digit] += 1 + index += 1 + + # Chop the ranges off at the point where the hyphen appears. + range_split = range_str.split("-") + table_lines.append("""\t{"%s", "%s"},""" % + (prefix_split[1] + "-" + range_split[0][0:length], + prefix_split[1] + "-" + range_split[1][0:length])) + + index_lines = [] + for i in range(10): + if first_digit_index[i] == -1: + index_lines.append("\t{0, 0},") + else: + index_lines.append("\t{%d, %d}," % (first_digit_index[i], first_digit_count[i])) + + return table_lines, index_lines + +def fetch_and_parse_source_data(): + #return ET.parse('x.xml').getroot() + response = requests.get(SOURCE_URL) + response.raise_for_status() + return ET.fromstring(response.text) + +def merge_isbn(input_lines): + root = fetch_and_parse_source_data() + indexes = {} + tables = {} + for gs1_prefix in GS1_PREFIXES: + tables[gs1_prefix], indexes[gs1_prefix] = generate_table(root, gs1_prefix) + + echo = True + for line in input_lines: + if echo: + yield line + if groups := re.search(r"@BEGIN (index|table):([0-9]+).*@", line): + echo = False + if groups.group(1) == "index": + yield from indexes[groups.group(2)] + elif groups.group(1) == "table": + yield from tables[groups.group(2)] + elif re.search(r"@END.*@", line): + yield line + echo = True + +if __name__ == "__main__": + input_lines = [] + with open("ISBN.h", "r") as f: + for line in f.readlines(): + input_lines.append(line.rstrip()) + output_lines = merge_isbn(input_lines) + with open("ISBN.h", "w") as f: + for line in output_lines: + f.write(line + "\n") -- 2.53.0