Header And Logo

PostgreSQL
| The world's most advanced open source database.

EAN13.h

Go to the documentation of this file.
00001 /*
00002  * EAN13.h
00003  *    PostgreSQL type definitions for ISNs (ISBN, ISMN, ISSN, EAN13, UPC)
00004  *
00005  * Information recompiled by Kronuz on August 23, 2006
00006  * http://www.gs1.org/productssolutions/idkeys/support/prefix_list.html
00007  *
00008  * IDENTIFICATION
00009  *    contrib/isn/EAN13.h
00010  *
00011  */
00012 
00013 /* where the digit set begins, and how many of them are in the table */
00014 const unsigned EAN13_index[10][2] = {
00015     {0, 6},
00016     {6, 1},
00017     {7, 1},
00018     {8, 5},
00019     {13, 20},
00020     {33, 15},
00021     {48, 19},
00022     {67, 23},
00023     {90, 17},
00024     {107, 12},
00025 };
00026 const char *EAN13_range[][2] = {
00027     {"000", "019"},             /* GS1 US */
00028     {"020", "029"},             /* Restricted distribution (MO defined) */
00029     {"030", "039"},             /* GS1 US */
00030     {"040", "049"},             /* Restricted distribution (MO defined) */
00031     {"050", "059"},             /* Coupons */
00032     {"060", "099"},             /* GS1 US */
00033     {"100", "139"},             /* GS1 US */
00034     {"200", "299"},             /* Restricted distribution (MO defined) */
00035     {"300", "379"},             /* GS1 France */
00036     {"380", "380"},             /* GS1 Bulgaria */
00037     {"383", "383"},             /* GS1 Slovenija */
00038     {"385", "385"},             /* GS1 Croatia */
00039     {"387", "387"},             /* GS1 BIH (Bosnia-Herzegovina) */
00040     {"400", "440"},             /* GS1 Germany */
00041     {"450", "459"},             /* GS1 Japan */
00042     {"460", "469"},             /* GS1 Russia */
00043     {"470", "470"},             /* GS1 Kyrgyzstan */
00044     {"471", "471"},             /* GS1 Taiwan */
00045     {"474", "474"},             /* GS1 Estonia */
00046     {"475", "475"},             /* GS1 Latvia */
00047     {"476", "476"},             /* GS1 Azerbaijan */
00048     {"477", "477"},             /* GS1 Lithuania */
00049     {"478", "478"},             /* GS1 Uzbekistan */
00050     {"479", "479"},             /* GS1 Sri Lanka */
00051     {"480", "480"},             /* GS1 Philippines */
00052     {"481", "481"},             /* GS1 Belarus */
00053     {"482", "482"},             /* GS1 Ukraine */
00054     {"484", "484"},             /* GS1 Moldova */
00055     {"485", "485"},             /* GS1 Armenia */
00056     {"486", "486"},             /* GS1 Georgia */
00057     {"487", "487"},             /* GS1 Kazakstan */
00058     {"489", "489"},             /* GS1 Hong Kong */
00059     {"490", "499"},             /* GS1 Japan */
00060     {"500", "509"},             /* GS1 UK */
00061     {"520", "520"},             /* GS1 Greece */
00062     {"528", "528"},             /* GS1 Lebanon */
00063     {"529", "529"},             /* GS1 Cyprus */
00064     {"530", "530"},             /* GS1 Albania */
00065     {"531", "531"},             /* GS1 MAC (FYR Macedonia) */
00066     {"535", "535"},             /* GS1 Malta */
00067     {"539", "539"},             /* GS1 Ireland */
00068     {"540", "549"},             /* GS1 Belgium & Luxembourg */
00069     {"560", "560"},             /* GS1 Portugal */
00070     {"569", "569"},             /* GS1 Iceland */
00071     {"570", "579"},             /* GS1 Denmark */
00072     {"590", "590"},             /* GS1 Poland */
00073     {"594", "594"},             /* GS1 Romania */
00074     {"599", "599"},             /* GS1 Hungary */
00075     {"600", "601"},             /* GS1 South Africa */
00076     {"603", "603"},             /* GS1 Ghana */
00077     {"608", "608"},             /* GS1 Bahrain */
00078     {"609", "609"},             /* GS1 Mauritius */
00079     {"611", "611"},             /* GS1 Morocco */
00080     {"613", "613"},             /* GS1 Algeria */
00081     {"616", "616"},             /* GS1 Kenya */
00082     {"618", "618"},             /* GS1 Ivory Coast */
00083     {"619", "619"},             /* GS1 Tunisia */
00084     {"621", "621"},             /* GS1 Syria */
00085     {"622", "622"},             /* GS1 Egypt */
00086     {"624", "624"},             /* GS1 Libya */
00087     {"625", "625"},             /* GS1 Jordan */
00088     {"626", "626"},             /* GS1 Iran */
00089     {"627", "627"},             /* GS1 Kuwait */
00090     {"628", "628"},             /* GS1 Saudi Arabia */
00091     {"629", "629"},             /* GS1 Emirates */
00092     {"640", "649"},             /* GS1 Finland */
00093     {"690", "695"},             /* GS1 China */
00094     {"700", "709"},             /* GS1 Norway */
00095     {"729", "729"},             /* GS1 Israel */
00096     {"730", "739"},             /* GS1 Sweden */
00097     {"740", "740"},             /* GS1 Guatemala */
00098     {"741", "741"},             /* GS1 El Salvador */
00099     {"742", "742"},             /* GS1 Honduras */
00100     {"743", "743"},             /* GS1 Nicaragua */
00101     {"744", "744"},             /* GS1 Costa Rica */
00102     {"745", "745"},             /* GS1 Panama */
00103     {"746", "746"},             /* GS1 Republica Dominicana */
00104     {"750", "750"},             /* GS1 Mexico */
00105     {"754", "755"},             /* GS1 Canada */
00106     {"759", "759"},             /* GS1 Venezuela */
00107     {"760", "769"},             /* GS1 Schweiz, Suisse, Svizzera */
00108     {"770", "770"},             /* GS1 Colombia */
00109     {"773", "773"},             /* GS1 Uruguay */
00110     {"775", "775"},             /* GS1 Peru */
00111     {"777", "777"},             /* GS1 Bolivia */
00112     {"779", "779"},             /* GS1 Argentina */
00113     {"780", "780"},             /* GS1 Chile */
00114     {"784", "784"},             /* GS1 Paraguay */
00115     {"786", "786"},             /* GS1 Ecuador */
00116     {"789", "790"},             /* GS1 Brasil */
00117     {"800", "839"},             /* GS1 Italy */
00118     {"840", "849"},             /* GS1 Spain */
00119     {"850", "850"},             /* GS1 Cuba */
00120     {"858", "858"},             /* GS1 Slovakia */
00121     {"859", "859"},             /* GS1 Czech */
00122     {"860", "860"},             /* GS1 YU (Serbia & Montenegro) */
00123     {"865", "865"},             /* GS1 Mongolia */
00124     {"867", "867"},             /* GS1 North Korea */
00125     {"869", "869"},             /* GS1 Turkey */
00126     {"870", "879"},             /* GS1 Netherlands */
00127     {"880", "880"},             /* GS1 South Korea */
00128     {"884", "884"},             /* GS1 Cambodia */
00129     {"885", "885"},             /* GS1 Thailand */
00130     {"888", "888"},             /* GS1 Singapore */
00131     {"890", "890"},             /* GS1 India */
00132     {"893", "893"},             /* GS1 Vietnam */
00133     {"899", "899"},             /* GS1 Indonesia */
00134     {"900", "919"},             /* GS1 Austria */
00135     {"930", "939"},             /* GS1 Australia */
00136     {"940", "949"},             /* GS1 New Zealand */
00137     {"950", "950"},             /* GS1 Head Office */
00138     {"955", "955"},             /* GS1 Malaysia */
00139     {"958", "958"},             /* GS1 Macau */
00140     {"977", "977"},             /* Serial publications (ISSN) */
00141     {"978", "978"},             /* Bookland (ISBN) */
00142     {"979", "979"},             /* International Standard Music Number (ISMN)
00143                                  * and ISBN contingent */
00144     {"980", "980"},             /* Refund receipts */
00145     {"981", "982"},             /* Common Currency Coupons */
00146     {"990", "999"},             /* Coupons */
00147     {NULL, NULL}
00148 };