test_code1.c 237 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444
  1. /*
  2. libzint - the open source barcode library
  3. Copyright (C) 2020-2024 Robin Stuart <rstuart114@gmail.com>
  4. Redistribution and use in source and binary forms, with or without
  5. modification, are permitted provided that the following conditions
  6. are met:
  7. 1. Redistributions of source code must retain the above copyright
  8. notice, this list of conditions and the following disclaimer.
  9. 2. Redistributions in binary form must reproduce the above copyright
  10. notice, this list of conditions and the following disclaimer in the
  11. documentation and/or other materials provided with the distribution.
  12. 3. Neither the name of the project nor the names of its contributors
  13. may be used to endorse or promote products derived from this software
  14. without specific prior written permission.
  15. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  16. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  17. IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  18. ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
  19. FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  20. DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  21. OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  22. HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  23. LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  24. OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  25. SUCH DAMAGE.
  26. */
  27. /* SPDX-License-Identifier: BSD-3-Clause */
  28. #include "testcommon.h"
  29. static void test_large(const testCtx *const p_ctx) {
  30. int debug = p_ctx->debug;
  31. struct item {
  32. int eci;
  33. int option_2;
  34. struct zint_structapp structapp;
  35. char *pattern;
  36. int length;
  37. int ret;
  38. int expected_rows;
  39. int expected_width;
  40. char *expected_errtxt;
  41. };
  42. /* Reference AIM USS Code One Table 2 */
  43. /* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
  44. static const struct item data[] = {
  45. /* 0*/ { -1, -1, { 0, 0, "" }, "1", 3550, 0, 148, 134, "" }, /* Auto Version H */
  46. /* 1*/ { -1, -1, { 0, 0, "" }, "1", 3551, ZINT_ERROR_TOO_LONG, -1, -1, "Error 517: Input too long, requires too many codewords (maximum 1480)" },
  47. /* 2*/ { 3, -1, { 0, 0, "" }, "1", 3535, 0, 148, 134, "" }, /* With ECI */
  48. /* 3*/ { 3, -1, { 0, 0, "" }, "1", 3536, ZINT_ERROR_TOO_LONG, -1, -1, "Error 517: Input too long, requires too many codewords (maximum 1480)" },
  49. /* 4*/ { -1, -1, { 1, 2, "" }, "1", 3546, 0, 148, 134, "" }, /* With Structured Append (Group mode, count < 2) */
  50. /* 5*/ { -1, -1, { 1, 2, "" }, "1", 3547, ZINT_ERROR_TOO_LONG, -1, -1, "Error 517: Input too long, requires too many codewords (maximum 1480)" },
  51. /* 6*/ { -1, -1, { 1, 16, "" }, "1", 3541, 0, 148, 134, "" }, /* With Structured Append (Extended Group mode, count >= 16) */
  52. /* 7*/ { -1, -1, { 1, 16, "" }, "1", 3542, ZINT_ERROR_TOO_LONG, -1, -1, "Error 517: Input too long, requires too many codewords (maximum 1480)" },
  53. /* 8*/ { 3, -1, { 1, 2, "" }, "1", 3532, 0, 148, 134, "" }, /* With ECI and Structured Append (Group mode) 1st symbol */
  54. /* 9*/ { 3, -1, { 1, 2, "" }, "1", 3533, ZINT_ERROR_TOO_LONG, -1, -1, "Error 517: Input too long, requires too many codewords (maximum 1480)" },
  55. /* 10*/ { 3, -1, { 2, 2, "" }, "1", 3537, 0, 148, 134, "" }, /* With ECI and Structured Append (Group mode) subsequent symbol */
  56. /* 11*/ { 3, -1, { 2, 2, "" }, "1", 3538, ZINT_ERROR_TOO_LONG, -1, -1, "Error 517: Input too long, requires too many codewords (maximum 1480)" },
  57. /* 12*/ { 3, -1, { 1, 16, "" }, "1", 3530, 0, 148, 134, "" }, /* With ECI and Structured Append (Extended Group mode) 1st symbol */
  58. /* 13*/ { 3, -1, { 1, 16, "" }, "1", 3531, ZINT_ERROR_TOO_LONG, -1, -1, "Error 517: Input too long, requires too many codewords (maximum 1480)" },
  59. /* 14*/ { 3, -1, { 2, 16, "" }, "1", 3535, 0, 148, 134, "" }, /* With ECI and Structured Append (Extended Group mode) subsequent symbol */
  60. /* 15*/ { 3, -1, { 2, 16, "" }, "1", 3536, ZINT_ERROR_TOO_LONG, -1, -1, "Error 517: Input too long, requires too many codewords (maximum 1480)" },
  61. /* 16*/ { -1, -1, { 0, 0, "" }, "A", 2218, 0, 148, 134, "" },
  62. /* 17*/ { -1, -1, { 0, 0, "" }, "A", 2219, ZINT_ERROR_TOO_LONG, -1, -1, "Error 517: Input too long, requires too many codewords (maximum 1480)" },
  63. /* 18*/ { -1, -1, { 0, 0, "" }, "\001", 1480, 0, 148, 134, "" }, /* Full ASCII */
  64. /* 19*/ { -1, -1, { 0, 0, "" }, "\001", 1481, ZINT_ERROR_TOO_LONG, -1, -1, "Error 517: Input too long, requires too many codewords (maximum 1480)" },
  65. /* 20*/ { -1, -1, { 0, 0, "" }, "\200", 1478, 0, 148, 134, "" }, /* BYTE */
  66. /* 21*/ { -1, -1, { 0, 0, "" }, "\200", 1479, ZINT_ERROR_TOO_LONG, -1, -1, "Error 517: Input too long, requires too many codewords (maximum 1480)" },
  67. /* 22*/ { -1, 1, { 0, 0, "" }, "1", 22, 0, 16, 18, "" }, /* Version A */
  68. /* 23*/ { -1, 1, { 0, 0, "" }, "1", 23, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version A, requires 11 codewords (maximum 10)" },
  69. /* 24*/ { -1, 1, { 0, 0, "" }, "A", 13, 0, 16, 18, "" },
  70. /* 25*/ { -1, 1, { 0, 0, "" }, "A", 14, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version A, requires 12 codewords (maximum 10)" },
  71. /* 26*/ { -1, 1, { 0, 0, "" }, "A", 2218, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version A, requires 1480 codewords (maximum 10)" },
  72. /* 27*/ { 3, 1, { 0, 0, "" }, "A", 4, 0, 16, 18, "" }, /* With ECI */
  73. /* 28*/ { 3, 1, { 0, 0, "" }, "A", 5, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version A, requires 11 codewords (maximum 10)" },
  74. /* 29*/ { -1, 1, { 1, 2, "" }, "A", 10, 0, 16, 18, "" }, /* With Structured Append */
  75. /* 30*/ { -1, 1, { 1, 2, "" }, "A", 11, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version A, requires 12 codewords (maximum 10)" },
  76. /* 31*/ { 3, 1, { 1, 2, "" }, "A", 2, 0, 16, 18, "" }, /* With ECI and Structured Append 1st symbol */
  77. /* 32*/ { 3, 1, { 1, 2, "" }, "A", 3, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version A, requires 11 codewords (maximum 10)" },
  78. /* 33*/ { 3, 1, { 2, 2, "" }, "A", 4, 0, 16, 18, "" }, /* With ECI and Structured Append subsequent symbol */
  79. /* 34*/ { 3, 1, { 2, 2, "" }, "A", 5, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version A, requires 11 codewords (maximum 10)" },
  80. /* 35*/ { -1, 1, { 0, 0, "" }, "\001", 10, 0, 16, 18, "" },
  81. /* 36*/ { -1, 1, { 0, 0, "" }, "\001", 11, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version A, requires 11 codewords (maximum 10)" },
  82. /* 37*/ { -1, 1, { 0, 0, "" }, "\200", 8, 0, 16, 18, "" },
  83. /* 38*/ { -1, 1, { 0, 0, "" }, "\200", 9, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version A, requires 11 codewords (maximum 10)" },
  84. /* 39*/ { -1, 2, { 0, 0, "" }, "1", 44, 0, 22, 22, "" }, /* Version B */
  85. /* 40*/ { -1, 2, { 0, 0, "" }, "1", 45, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version B, requires 20 codewords (maximum 19)" },
  86. /* 41*/ { -1, 2, { 0, 0, "" }, "A", 27, 0, 22, 22, "" },
  87. /* 42*/ { -1, 2, { 0, 0, "" }, "A", 28, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version B, requires 21 codewords (maximum 19)" },
  88. /* 43*/ { -1, 2, { 0, 0, "" }, "A", 26, 0, 22, 22, "" },
  89. /* 44*/ { -1, 2, { 0, 0, "" }, "\001", 19, 0, 22, 22, "" },
  90. /* 45*/ { -1, 2, { 0, 0, "" }, "\001", 20, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version B, requires 20 codewords (maximum 19)" },
  91. /* 46*/ { -1, 2, { 0, 0, "" }, "\200", 17, 0, 22, 22, "" },
  92. /* 47*/ { -1, 2, { 0, 0, "" }, "\200", 18, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version B, requires 20 codewords (maximum 19)" },
  93. /* 48*/ { -1, 3, { 0, 0, "" }, "1", 104, 0, 28, 32, "" }, /* Version C */
  94. /* 49*/ { -1, 3, { 0, 0, "" }, "1", 105, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version C, requires 45 codewords (maximum 44)" },
  95. /* 50*/ { -1, 3, { 0, 0, "" }, "A", 64, 0, 28, 32, "" },
  96. /* 51*/ { -1, 3, { 0, 0, "" }, "A", 65, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version C, requires 46 codewords (maximum 44)" },
  97. /* 52*/ { -1, 3, { 0, 0, "" }, "\001", 44, 0, 28, 32, "" },
  98. /* 53*/ { -1, 3, { 0, 0, "" }, "\001", 45, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version C, requires 45 codewords (maximum 44)" },
  99. /* 54*/ { -1, 3, { 0, 0, "" }, "\200", 42, 0, 28, 32, "" },
  100. /* 55*/ { -1, 3, { 0, 0, "" }, "\200", 43, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version C, requires 45 codewords (maximum 44)" },
  101. /* 56*/ { -1, 4, { 0, 0, "" }, "1", 217, 0, 40, 42, "" }, /* Version D */
  102. /* 57*/ { -1, 4, { 0, 0, "" }, "1", 218, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version D, requires 93 codewords (maximum 91)" },
  103. /* 58*/ { -1, 4, { 0, 0, "" }, "A", 135, 0, 40, 42, "" },
  104. /* 59*/ { -1, 4, { 0, 0, "" }, "A", 136, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version D, requires 93 codewords (maximum 91)" },
  105. /* 60*/ { -1, 4, { 0, 0, "" }, "\001", 91, 0, 40, 42, "" },
  106. /* 61*/ { -1, 4, { 0, 0, "" }, "\001", 92, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version D, requires 92 codewords (maximum 91)" },
  107. /* 62*/ { -1, 4, { 0, 0, "" }, "\200", 89, 0, 40, 42, "" },
  108. /* 63*/ { -1, 4, { 0, 0, "" }, "\200", 90, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version D, requires 92 codewords (maximum 91)" },
  109. /* 64*/ { -1, 5, { 0, 0, "" }, "1", 435, 0, 52, 54, "" }, /* Version E (note 435 multiple of 3) */
  110. /* 65*/ { -1, 5, { 0, 0, "" }, "1", 436, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version E, requires 183 codewords (maximum 182)" },
  111. /* 66*/ { -1, 5, { 0, 0, "" }, "1", 434, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version E, requires 183 codewords (maximum 182)" }, /* NOTE: a quirk of decimal end-of-data processing is existence of "lower maxs" if digits are not a multiple of 3 */
  112. /* 67*/ { -1, 5, { 0, 0, "" }, "1", 433, 0, 52, 54, "" },
  113. /* 68*/ { -1, 5, { 0, 0, "" }, "A", 271, 0, 52, 54, "" },
  114. /* 69*/ { -1, 5, { 0, 0, "" }, "A", 272, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version E, requires 184 codewords (maximum 182)" },
  115. /* 70*/ { -1, 5, { 0, 0, "" }, "\001", 182, 0, 52, 54, "" },
  116. /* 71*/ { -1, 5, { 0, 0, "" }, "\001", 183, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version E, requires 183 codewords (maximum 182)" },
  117. /* 72*/ { -1, 5, { 0, 0, "" }, "\200", 180, 0, 52, 54, "" },
  118. /* 73*/ { -1, 5, { 0, 0, "" }, "\200", 181, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version E, requires 183 codewords (maximum 182)" },
  119. /* 74*/ { -1, 6, { 0, 0, "" }, "1", 886, 0, 70, 76, "" }, /* Version F */
  120. /* 75*/ { -1, 6, { 0, 0, "" }, "1", 887, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version F, requires 371 codewords (maximum 370)" },
  121. /* 76*/ { -1, 6, { 0, 0, "" }, "A", 553, 0, 70, 76, "" },
  122. /* 77*/ { -1, 6, { 0, 0, "" }, "A", 554, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version F, requires 372 codewords (maximum 370)" },
  123. /* 78*/ { -1, 6, { 0, 0, "" }, "\001", 370, 0, 70, 76, "" },
  124. /* 79*/ { -1, 6, { 0, 0, "" }, "\001", 371, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version F, requires 371 codewords (maximum 370)" },
  125. /* 80*/ { -1, 6, { 0, 0, "" }, "\200", 368, 0, 70, 76, "" },
  126. /* 81*/ { -1, 6, { 0, 0, "" }, "\200", 369, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version F, requires 372 codewords (maximum 370)" },
  127. /* 82*/ { -1, 7, { 0, 0, "" }, "1", 1755, 0, 104, 98, "" }, /* Version G (note 1755 multiple of 3) */
  128. /* 83*/ { -1, 7, { 0, 0, "" }, "1", 1756, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version G, requires 733 codewords (maximum 732)" },
  129. /* 84*/ { -1, 7, { 0, 0, "" }, "1", 1754, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version G, requires 733 codewords (maximum 732)" }, /* NOTE: a quirk of decimal end-of-data processing is existence of "lower maxs" if digits are not a multiple of 3 */
  130. /* 85*/ { -1, 7, { 0, 0, "" }, "1", 1753, 0, 104, 98, "" },
  131. /* 86*/ { -1, 7, { 0, 0, "" }, "A", 1096, 0, 104, 98, "" },
  132. /* 87*/ { -1, 7, { 0, 0, "" }, "A", 1097, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version G, requires 734 codewords (maximum 732)" },
  133. /* 88*/ { -1, 7, { 0, 0, "" }, "\001", 732, 0, 104, 98, "" },
  134. /* 89*/ { -1, 7, { 0, 0, "" }, "\001", 733, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version G, requires 733 codewords (maximum 732)" },
  135. /* 90*/ { -1, 7, { 0, 0, "" }, "\200", 730, 0, 104, 98, "" },
  136. /* 91*/ { -1, 7, { 0, 0, "" }, "\200", 731, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version G, requires 734 codewords (maximum 732)" },
  137. /* 92*/ { -1, 7, { 0, 0, "" }, "\200", 732, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version G, requires 735 codewords (maximum 732)" },
  138. /* 93*/ { -1, 7, { 0, 0, "" }, "\200", 1478, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version G, requires 1480 codewords (maximum 732)" },
  139. /* 94*/ { -1, 8, { 0, 0, "" }, "1", 3550, 0, 148, 134, "" }, /* Version H */
  140. /* 95*/ { -1, 8, { 0, 0, "" }, "1", 3551, ZINT_ERROR_TOO_LONG, -1, -1, "Error 517: Input too long, requires too many codewords (maximum 1480)" },
  141. /* 96*/ { -1, 8, { 0, 0, "" }, "A", 2218, 0, 148, 134, "" },
  142. /* 97*/ { -1, 8, { 0, 0, "" }, "A", 2219, ZINT_ERROR_TOO_LONG, -1, -1, "Error 517: Input too long, requires too many codewords (maximum 1480)" },
  143. /* 98*/ { -1, 8, { 0, 0, "" }, "\001", 1480, 0, 148, 134, "" },
  144. /* 99*/ { -1, 8, { 0, 0, "" }, "\001", 1481, ZINT_ERROR_TOO_LONG, -1, -1, "Error 517: Input too long, requires too many codewords (maximum 1480)" },
  145. /*100*/ { -1, 8, { 0, 0, "" }, "\200", 1478, 0, 148, 134, "" },
  146. /*101*/ { -1, 8, { 0, 0, "" }, "\200", 1479, ZINT_ERROR_TOO_LONG, -1, -1, "Error 517: Input too long, requires too many codewords (maximum 1480)" },
  147. /*102*/ { -1, 9, { 0, 0, "" }, "1", 6, 0, 8, 11, "" }, /* Version S-10 */
  148. /*103*/ { -1, 9, { 0, 0, "" }, "1", 7, 0, 8, 21, "" }, /* -> S-20 */
  149. /*104*/ { -1, 9, { 0, 0, "" }, "1", 12, 0, 8, 21, "" }, /* Version S-20 */
  150. /*105*/ { -1, 9, { 0, 0, "" }, "1", 13, 0, 8, 31, "" }, /* -> S-30 */
  151. /*106*/ { -1, 9, { 0, 0, "" }, "1", 18, 0, 8, 31, "" }, /* Version S-30 */
  152. /*107*/ { -1, 9, { 0, 0, "" }, "1", 19, ZINT_ERROR_TOO_LONG, -1, -1, "Error 514: Input length 19 too long for Version S (maximum 18)" },
  153. /*108*/ { -1, 9, { 0, 0, "" }, "1", 17, 0, 8, 31, "" },
  154. /*109*/ { -1, 10, { 0, 0, "" }, "1", 22, 0, 16, 17, "" }, /* Version T-16 */
  155. /*110*/ { -1, 10, { 0, 0, "" }, "1", 23, 0, 16, 33, "" }, /* -> T-32 */
  156. /*111*/ { -1, 10, { 0, 0, "" }, "A", 13, 0, 16, 17, "" },
  157. /*112*/ { -1, 10, { 0, 0, "" }, "A", 14, 0, 16, 33, "" }, /* -> T-32 */
  158. /*113*/ { -1, 10, { 0, 0, "" }, "\001", 10, 0, 16, 17, "" },
  159. /*114*/ { -1, 10, { 0, 0, "" }, "\001", 11, 0, 16, 33, "" }, /* -> T-32 */
  160. /*115*/ { -1, 10, { 0, 0, "" }, "\200", 8, 0, 16, 17, "" },
  161. /*116*/ { -1, 10, { 0, 0, "" }, "\200", 9, 0, 16, 33, "" }, /* -> T-32 */
  162. /*117*/ { -1, 10, { 0, 0, "" }, "1", 56, 0, 16, 33, "" }, /* Version T-32 */
  163. /*118*/ { -1, 10, { 0, 0, "" }, "1", 57, 0, 16, 49, "" }, /* -> T-48 */
  164. /*119*/ { -1, 10, { 0, 0, "" }, "A", 34, 0, 16, 33, "" },
  165. /*120*/ { -1, 10, { 0, 0, "" }, "A", 35, 0, 16, 49, "" }, /* -> T-48 */
  166. /*121*/ { -1, 10, { 0, 0, "" }, "\001", 24, 0, 16, 33, "" },
  167. /*122*/ { -1, 10, { 0, 0, "" }, "\001", 25, 0, 16, 49, "" }, /* -> T-48 */
  168. /*123*/ { -1, 10, { 0, 0, "" }, "\200", 22, 0, 16, 33, "" },
  169. /*124*/ { -1, 10, { 0, 0, "" }, "\200", 23, 0, 16, 49, "" }, /* -> T-48 */
  170. /*125*/ { -1, 10, { 0, 0, "" }, "1", 90, 0, 16, 49, "" }, /* Version T-48 (note 90 multiple of 3) */
  171. /*126*/ { -1, 10, { 0, 0, "" }, "1", 91, ZINT_ERROR_TOO_LONG, -1, -1, "Error 519: Input length 91 too long for Version T (maximum 90)" },
  172. /*127*/ { -1, 10, { 0, 0, "" }, "1", 89, ZINT_ERROR_TOO_LONG, -1, -1, "Error 516: Input too long for Version T, requires 39 codewords (maximum 38)" }, /* NOTE: a quirk of decimal end-of-data processing is existence of "lower maxs" if digits are not a multiple of 3 */
  173. /*128*/ { -1, 10, { 0, 0, "" }, "1", 88, 0, 16, 49, "" },
  174. /*129*/ { -1, 10, { 0, 0, "" }, "A", 55, 0, 16, 49, "" },
  175. /*130*/ { -1, 10, { 0, 0, "" }, "A", 56, ZINT_ERROR_TOO_LONG, -1, -1, "Error 516: Input too long for Version T, requires 40 codewords (maximum 38)" },
  176. /*131*/ { -1, 10, { 0, 0, "" }, "A", 90, ZINT_ERROR_TOO_LONG, -1, -1, "Error 516: Input too long for Version T, requires 61 codewords (maximum 38)" },
  177. /*132*/ { -1, 10, { 0, 0, "" }, "\001", 38, 0, 16, 49, "" },
  178. /*133*/ { -1, 10, { 0, 0, "" }, "\001", 39, ZINT_ERROR_TOO_LONG, -1, -1, "Error 516: Input too long for Version T, requires 39 codewords (maximum 38)" },
  179. /*134*/ { -1, 10, { 0, 0, "" }, "\001", 90, ZINT_ERROR_TOO_LONG, -1, -1, "Error 516: Input too long for Version T, requires 90 codewords (maximum 38)" },
  180. /*135*/ { -1, 10, { 0, 0, "" }, "\\", 38, 0, 16, 49, "" },
  181. /*136*/ { -1, 10, { 0, 0, "" }, "\\", 39, ZINT_ERROR_TOO_LONG, -1, -1, "Error 516: Input too long for Version T, requires 39 codewords (maximum 38)" },
  182. /*137*/ { -1, 10, { 0, 0, "" }, "\200", 36, 0, 16, 49, "" },
  183. /*138*/ { -1, 10, { 0, 0, "" }, "\200", 37, ZINT_ERROR_TOO_LONG, -1, -1, "Error 516: Input too long for Version T, requires 39 codewords (maximum 38)" },
  184. /*139*/ { -1, 10, { 0, 0, "" }, "AAA\200", 31, 0, 16, 49, "" }, /* ASCII + BYTE (ASCII UpSh - worse than BYTE) */
  185. /*140*/ { -1, 10, { 0, 0, "" }, "AAA\200", 32, ZINT_ERROR_TOO_LONG, -1, -1, "Error 516: Input too long for Version T, requires 40 codewords (maximum 38)" },
  186. /*141*/ { 3, 10, { 0, 0, "" }, "A", 46, 0, 16, 49, "" }, /* Version T-48 with ECI (9 less as PAD escape char + "\123456") */
  187. /*142*/ { 3, 10, { 0, 0, "" }, "A", 47, ZINT_ERROR_TOO_LONG, -1, -1, "Error 516: Input too long for Version T, requires 40 codewords (maximum 38)" },
  188. /*143*/ { 3, 10, { 0, 0, "" }, "\001", 32, 0, 16, 49, "" },
  189. /*144*/ { 3, 10, { 0, 0, "" }, "\001", 33, ZINT_ERROR_TOO_LONG, -1, -1, "Error 516: Input too long for Version T, requires 39 codewords (maximum 38)" },
  190. };
  191. const int data_size = ARRAY_SIZE(data);
  192. int i, length, ret;
  193. struct zint_symbol *symbol = NULL;
  194. char data_buf[4096];
  195. testStartSymbol("test_large", &symbol);
  196. for (i = 0; i < data_size; i++) {
  197. if (testContinue(p_ctx, i)) continue;
  198. symbol = ZBarcode_Create();
  199. assert_nonnull(symbol, "Symbol not created\n");
  200. testUtilStrCpyRepeat(data_buf, data[i].pattern, data[i].length);
  201. assert_equal(data[i].length, (int) strlen(data_buf), "i:%d length %d != strlen(data_buf) %d\n", i, data[i].length, (int) strlen(data_buf));
  202. length = testUtilSetSymbol(symbol, BARCODE_CODEONE, -1 /*input_mode*/, data[i].eci, -1 /*option_1*/, data[i].option_2, -1, -1 /*output_options*/, data_buf, data[i].length, debug);
  203. if (data[i].structapp.count) {
  204. symbol->structapp = data[i].structapp;
  205. }
  206. ret = ZBarcode_Encode(symbol, (unsigned char *) data_buf, length);
  207. assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
  208. assert_equal(symbol->errtxt[0] == '\0', ret == 0, "i:%d symbol->errtxt not %s (%s)\n", i, ret ? "set" : "empty", symbol->errtxt);
  209. assert_zero(strcmp(symbol->errtxt, data[i].expected_errtxt), "i:%d strcmp(%s, %s) != 0\n", i, symbol->errtxt, data[i].expected_errtxt);
  210. if (ret < ZINT_ERROR) {
  211. assert_equal(symbol->rows, data[i].expected_rows, "i:%d symbol->rows %d != %d\n", i, symbol->rows, data[i].expected_rows);
  212. assert_equal(symbol->width, data[i].expected_width, "i:%d symbol->width %d != %d\n", i, symbol->width, data[i].expected_width);
  213. }
  214. ZBarcode_Delete(symbol);
  215. }
  216. testFinish();
  217. }
  218. static void test_input(const testCtx *const p_ctx) {
  219. int debug = p_ctx->debug;
  220. struct item {
  221. int input_mode;
  222. int eci;
  223. int option_2;
  224. struct zint_structapp structapp;
  225. char *data;
  226. int length;
  227. int ret;
  228. int expected_rows;
  229. int expected_width;
  230. const char *expected_errtxt;
  231. };
  232. /* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
  233. static const struct item data[] = {
  234. /* 0*/ { -1, -1, -1, { 0, 0, "" }, "123456789012ABCDEFGHI", -1, 0, 22, 22, "", },
  235. /* 1*/ { -1, -1, -1, { 0, 0, "" }, "123456789012ABCDEFGHIJ", -1, 0, 22, 22, "", },
  236. /* 2*/ { -1, -1, -1, { 0, 0, "" }, "1", -1, 0, 16, 18, "", },
  237. /* 3*/ { -1, -1, 0, { 0, 0, "" }, "1", -1, 0, 16, 18, "", },
  238. /* 4*/ { -1, -1, 1, { 0, 0, "" }, "1", -1, 0, 16, 18, "", },
  239. /* 5*/ { -1, -1, 1, { 0, 0, "" }, "ABCDEFGHIJKLMN", -1, ZINT_ERROR_TOO_LONG, -1, -1, "Error 518: Input too long for Version A, requires 12 codewords (maximum 10)", },
  240. /* 6*/ { GS1_MODE, -1, 1, { 0, 0, "" }, "[01]12345678901231", -1, 0, 16, 18, "", },
  241. /* 7*/ { GS1_MODE | GS1PARENS_MODE, -1, 1, { 0, 0, "" }, "(01)12345678901231", -1, 0, 16, 18, "", },
  242. /* 8*/ { -1, 3, 1, { 0, 0, "" }, "1", -1, 0, 16, 18, "", },
  243. /* 9*/ { UNICODE_MODE, 3, 1, { 0, 0, "" }, "é", -1, 0, 16, 18, "", },
  244. /* 10*/ { GS1_MODE, 3, 1, { 0, 0, "" }, "[01]12345678901231", -1, ZINT_WARN_INVALID_OPTION, 16, 18, "Warning 512: ECI ignored for GS1 mode", },
  245. /* 11*/ { -1, -1, 9, { 0, 0, "" }, "123456789012345678", -1, 0, 8, 31, "", },
  246. /* 12*/ { -1, -1, 9, { 0, 0, "" }, "12345678901234567A", -1, ZINT_ERROR_INVALID_DATA, -1, -1, "Error 515: Invalid character at position 18 in input (Version S encodes digits only)", },
  247. /* 13*/ { -1, -1, 9, { 0, 0, "" }, "1234567890123456789", -1, ZINT_ERROR_TOO_LONG, -1, -1, "Error 514: Input length 19 too long for Version S (maximum 18)", },
  248. /* 14*/ { GS1_MODE, -1, 9, { 0, 0, "" }, "[01]12345678901231", -1, ZINT_WARN_INVALID_OPTION, 8, 31, "Warning 511: GS1 mode ignored for Version S", },
  249. /* 15*/ { -1, 3, 9, { 0, 0, "" }, "1", -1, ZINT_WARN_INVALID_OPTION, 8, 11, "Warning 511: ECI ignored for Version S", },
  250. /* 16*/ { GS1_MODE, 3, 9, { 0, 0, "" }, "[01]12345678901231", -1, ZINT_WARN_INVALID_OPTION, 8, 31, "Warning 511: ECI and GS1 mode ignored for Version S", },
  251. /* 17*/ { -1, -1, 10, { 0, 0, "" }, "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", -1, 0, 16, 49, "", },
  252. /* 18*/ { -1, -1, 10, { 0, 0, "" }, "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901", -1, ZINT_ERROR_TOO_LONG, -1, -1, "Error 519: Input length 91 too long for Version T (maximum 90)", },
  253. /* 19*/ { -1, -1, 10, { 0, 0, "" }, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", -1, 0, 16, 49, "", },
  254. /* 20*/ { -1, -1, 10, { 0, 0, "" }, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", -1, ZINT_ERROR_TOO_LONG, -1, -1, "Error 516: Input too long for Version T, requires 55 codewords (maximum 38)", },
  255. /* 21*/ { -1, -1, 10, { 0, 0, "" }, "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000", 38, 0, 16, 49, "", },
  256. /* 22*/ { -1, 3, 10, { 0, 0, "" }, "1234567890123456789012345678901234567890123456789012345678901234567890123456", -1, 0, 16, 49, "", },
  257. /* 23*/ { -1, 3, 10, { 0, 0, "" }, "12345678901234567890123456789012345678901234567890123456789012345678901234567", -1, ZINT_ERROR_TOO_LONG, -1, -1, "Error 516: Input too long for Version T, requires 39 codewords (maximum 38)", },
  258. /* 24*/ { -1, 3, 10, { 0, 0, "" }, "123456789012345678901234567890123456789012345678901234567890123456789012345678901234", -1, ZINT_ERROR_TOO_LONG, -1, -1, "Error 519: Input length 91 too long for Version T (maximum 90)", },
  259. /* 25*/ { GS1_MODE, -1, 10, { 0, 0, "" }, "[01]12345678901231", -1, 0, 16, 17, "", },
  260. /* 26*/ { GS1_MODE, 3, 10, { 0, 0, "" }, "[01]12345678901231", -1, ZINT_WARN_INVALID_OPTION, 16, 17, "Warning 512: ECI ignored for GS1 mode", },
  261. /* 27*/ { -1, -1, 11, { 0, 0, "" }, "1", -1, ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 513: Version '11' out of range (1 to 10)", },
  262. /* 28*/ { -1, -1, -2, { 0, 0, "" }, "1", -1, ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 513: Version '-2' out of range (1 to 10)", },
  263. /* 29*/ { GS1_MODE, -1, -1, { 1, 2, "" }, "[01]12345678901231", -1, ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 710: Cannot have Structured Append and GS1 mode at the same time", },
  264. /* 30*/ { -1, -1, -1, { 1, 1, "" }, "123456789012ABCDEFGHI", -1, ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 711: Structured Append count '1' out of range (2 to 128)", },
  265. /* 31*/ { -1, -1, -1, { 1, -1, "" }, "123456789012ABCDEFGHI", -1, ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 711: Structured Append count '-1' out of range (2 to 128)", },
  266. /* 32*/ { -1, -1, -1, { 1, 129, "" }, "123456789012ABCDEFGHI", -1, ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 711: Structured Append count '129' out of range (2 to 128)", },
  267. /* 33*/ { -1, -1, -1, { 0, 2, "" }, "123456789012ABCDEFGHI", -1, ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 712: Structured Append index '0' out of range (1 to count 2)", },
  268. /* 34*/ { -1, -1, -1, { 3, 2, "" }, "123456789012ABCDEFGHI", -1, ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 712: Structured Append index '3' out of range (1 to count 2)", },
  269. /* 35*/ { -1, -1, -1, { 1, 2, "1" }, "123456789012ABCDEFGHI", -1, ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 713: Structured Append ID not available for Code One", },
  270. /* 36*/ { -1, -1, 9, { 1, 2, "" }, "123456789012ABCDEFGHI", -1, ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 714: Structured Append not available for Version S", },
  271. /* 37*/ { -1, -1, 9, { 3, 2, "" }, "123456789012ABCDEFGHI", -1, ZINT_ERROR_INVALID_OPTION, -1, -1, "Error 714: Structured Append not available for Version S", }, /* Trumps other checking */
  272. };
  273. const int data_size = ARRAY_SIZE(data);
  274. int i, length, ret;
  275. struct zint_symbol *symbol = NULL;
  276. testStartSymbol("test_input", &symbol);
  277. for (i = 0; i < data_size; i++) {
  278. if (testContinue(p_ctx, i)) continue;
  279. symbol = ZBarcode_Create();
  280. assert_nonnull(symbol, "Symbol not created\n");
  281. length = testUtilSetSymbol(symbol, BARCODE_CODEONE, data[i].input_mode, data[i].eci, -1 /*option_1*/, data[i].option_2, -1, -1 /*output_options*/, data[i].data, data[i].length, debug);
  282. if (data[i].structapp.count) {
  283. symbol->structapp = data[i].structapp;
  284. }
  285. ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
  286. assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
  287. if (ret < ZINT_ERROR) {
  288. assert_equal(symbol->rows, data[i].expected_rows, "i:%d symbol->rows %d != %d\n", i, symbol->rows, data[i].expected_rows);
  289. assert_equal(symbol->width, data[i].expected_width, "i:%d symbol->width %d != %d\n", i, symbol->width, data[i].expected_width);
  290. }
  291. assert_zero(strcmp(symbol->errtxt, data[i].expected_errtxt), "i:%d symbol->errtxt %s != %s\n", i, symbol->errtxt, data[i].expected_errtxt);
  292. ZBarcode_Delete(symbol);
  293. }
  294. testFinish();
  295. }
  296. static void test_encode(const testCtx *const p_ctx) {
  297. int debug = p_ctx->debug;
  298. struct item {
  299. int input_mode;
  300. int eci;
  301. int option_2;
  302. struct zint_structapp structapp;
  303. char *data;
  304. int length;
  305. int ret;
  306. int expected_rows;
  307. int expected_width;
  308. int bwipp_cmp;
  309. char *comment;
  310. char *expected;
  311. };
  312. /* Figure examples AIM USS Code One (USSCO) Revision March 3, 2000 */
  313. static const struct item data[] = {
  314. /* 0*/ { -1, -1, -1, { 0, 0, "" }, "1234567890123456789012", -1, 0, 16, 18, 1, "USSCO Figure 1 (Version A, no padding), same",
  315. "111111111111001100"
  316. "000110000110010101"
  317. "100010110101101010"
  318. "000010010110100111"
  319. "111010100010101100"
  320. "000010000000100000"
  321. "111111111111111111"
  322. "000000000000000000"
  323. "011111111111111110"
  324. "010000000000000010"
  325. "011111111111111110"
  326. "000111011001101110"
  327. "010110011110101111"
  328. "101000010001101000"
  329. "100111000001100000"
  330. "101000001010111101"
  331. },
  332. /* 1*/ { -1, -1, -1, { 0, 0, "" }, "???????????????????????????????????????????????????????????????????????????????????????????", -1, 0, 40, 42, 1, "USSCO Figure 7 (Version D, no padding), same",
  333. "010011010001000100011100010001000100110100"
  334. "000010000000000000001000000000000000100000"
  335. "010010010001000100011000010001000100100100"
  336. "000010000000000000001000000000000000100000"
  337. "010010010001000100011000010001000100100100"
  338. "000010000000000000001000000000000000100000"
  339. "010010010001000100011000010001000100100100"
  340. "000010000000000000001000000000000000100000"
  341. "010010010001000100011000010001000100100100"
  342. "000010000000000000001000000000000000100000"
  343. "010010010001000100011000010001000100100100"
  344. "000010000000000000001000000000000000100000"
  345. "010011010001000100011100010001000100110100"
  346. "000010000000000000001000000000000000100000"
  347. "010010010001000100011000010001000100100100"
  348. "000010000000000000001000000000000000100000"
  349. "111111111111111111111111111111111111111111"
  350. "000000000000000000000000000000000000000000"
  351. "011111111111111111111111111111111111111110"
  352. "010000000000000000000000000000000000000010"
  353. "011111111111111111111111111111111111111110"
  354. "010000000000000000000000000000000000000010"
  355. "011111111111111111111111111111111111111110"
  356. "010000000000000000000000000000000000000010"
  357. "011111111111111111111111111111111111111110"
  358. "000010000000000000001000000000000000100000"
  359. "010010010001000100011000010001000100100100"
  360. "000011000000000000001100000000000000110000"
  361. "010010010001000100011000010001000100100100"
  362. "000010000000000000001000000000000000100000"
  363. "010010111100010001111000011011111001100011"
  364. "000010001000000000011010101011101000101101"
  365. "001110101011100111011000101110010010101011"
  366. "101010110000000011011001000100101100100000"
  367. "100110011111100011001010001111001100101100"
  368. "001110111010110001101011100101111101101100"
  369. "101010111111011110111001000100010110100111"
  370. "001110010111101000111000010011001011101011"
  371. "001010001001110101011000110000111010101100"
  372. "101111001111111001001101111000011111110010"
  373. },
  374. /* 2*/ { -1, -1, 9, { 0, 0, "" }, "1234567890", -1, 0, 8, 21, 1, "USSCO Figure 9 (left) NOTE: S-20 not S-10 as stated, same",
  375. "000000011110110010110"
  376. "000010000100000010011"
  377. "101111110100010100100"
  378. "010010001100110001010"
  379. "000000000010000000000"
  380. "111111111111111111111"
  381. "100000000000000000001"
  382. "101111111111111111101"
  383. },
  384. /* 3*/ { -1, -1, 10, { 0, 0, "" }, "12345678901234567890", -1, 0, 16, 17, 1, "USSCO Figure 9 (right) **NOT SAME** different encodation, figure uses ASCII double digits, Zint DECIMAL (same no. of codewords)",
  385. "11111111111001100"
  386. "00010001010010101"
  387. "10001101001101010"
  388. "00000101010100111"
  389. "11111101010000111"
  390. "11011100000100101"
  391. "11000001000000111"
  392. "01111010010010011"
  393. "11111010001101101"
  394. "00100011010111111"
  395. "00000000100000000"
  396. "11111111111111111"
  397. "10000000000000001"
  398. "10111111111111101"
  399. "10000000000000001"
  400. "10111111111111101"
  401. },
  402. /* 4*/ { GS1_MODE, -1, 2, { 0, 0, "" }, "[01]00312341234014[15]950915[10]ABC123456", -1, 0, 22, 22, 1, "USSCO Figure B1 **NOT SAME** using (10) not (30) as (30) no longer compliant",
  403. "1110110000110000001010"
  404. "1100100010001000111100"
  405. "0111100110100100001101"
  406. "1100100100101011101111"
  407. "1001101111100001000100"
  408. "0100101101110000100011"
  409. "0100101000101010110101"
  410. "0000100000000000100000"
  411. "1111111111111111111111"
  412. "0000000000000000000000"
  413. "0111111111111111111110"
  414. "0100000000000000000010"
  415. "0111111111111111111110"
  416. "0100000000000000000010"
  417. "0111111111111111111110"
  418. "0100111001001010100111"
  419. "1001110100011011100001"
  420. "0011101101100110100101"
  421. "1101000110001101100000"
  422. "1010001101011111101100"
  423. "1111101011001110101010"
  424. "1010010111000001110111"
  425. },
  426. /* 5*/ { GS1_MODE | GS1NOCHECK_MODE, -1, 2, { 0, 0, "" }, "[01]00312341234014[15]950915[30]ABC123456", -1, 0, 22, 22, 1, "USSCO Figure B1 same",
  427. "1110110000110000001010"
  428. "1100100010001000111100"
  429. "0111100110100100001101"
  430. "1100100100101011101111"
  431. "1001101111101001000100"
  432. "0100101101000000100011"
  433. "0100101000101010110111"
  434. "0000100000000000100000"
  435. "1111111111111111111111"
  436. "0000000000000000000000"
  437. "0111111111111111111110"
  438. "0100000000000000000010"
  439. "0111111111111111111110"
  440. "0100000000000000000010"
  441. "0111111111111111111110"
  442. "0100111001001010101110"
  443. "1100100111000101101010"
  444. "1011001110001010100000"
  445. "0110011100010001101001"
  446. "1010101110011010101001"
  447. "1101111110110010101110"
  448. "1010011100101001110101"
  449. },
  450. /* 6*/ { -1, -1, -1, { 0, 0, "" }, "Code One", -1, 0, 16, 18, 1, "BWIPP example",
  451. "010011011101100110"
  452. "010010000001010110"
  453. "001010010101100110"
  454. "000110000011110110"
  455. "100010100000111001"
  456. "000010000000100000"
  457. "111111111111111111"
  458. "000000000000000000"
  459. "011111111111111110"
  460. "010000000000000010"
  461. "011111111111111110"
  462. "000100011110101101"
  463. "101101000111101011"
  464. "010100001110101100"
  465. "100001100111100100"
  466. "100000111000111000"
  467. },
  468. /* 7*/ { -1, -1, 9, { 0, 0, "" }, "406990", -1, 0, 8, 11, 1, "BWIPP Version S-10 example",
  469. "01101101101"
  470. "00101010111"
  471. "01101001101"
  472. "00100000100"
  473. "00000000000"
  474. "11111111111"
  475. "10000000001"
  476. "10111111101"
  477. },
  478. /* 8*/ { -1, -1, 3, { 0, 0, "" }, "1234567890ABCDEF", -1, 0, 28, 32, 1, "https://fr.wikipedia.org/wiki/Liste_des_symbologies **NOT SAME** as Zint has unlatch to ASCII at end (before padding)",
  479. "10001110101011110111011110110101"
  480. "11101001001010000011000110101001"
  481. "11101001100010111110001000101000"
  482. "10011011010100111100010001100001"
  483. "10001010001000100010001000101000"
  484. "00011000010001000100010001100001"
  485. "10001010001000100010001000101000"
  486. "00011000010001000100010001100001"
  487. "10001010001000100010001000101000"
  488. "00011000010001000100010001100001"
  489. "00001000000000000000000000100000"
  490. "11111111111111111111111111111111"
  491. "00000000000000000000000000100000"
  492. "11111111111111111111111111111111"
  493. "00000000000000000000000000000000"
  494. "01111111111111111111111111111110"
  495. "01000000000000000000000000000010"
  496. "01111111111111111111111111111110"
  497. "10001010001000100010001000101000"
  498. "00011000010001000100010001100001"
  499. "10001010001010101001001100101101"
  500. "00011000011001100111111110100001"
  501. "01101011001000111101000001100000"
  502. "11101010110111100100001100100100"
  503. "10111001101111010101010011100101"
  504. "11001001100111010000000111101100"
  505. "01101001101100000101111100100000"
  506. "00111100100000110101111110111001"
  507. },
  508. /* 9*/ { -1, -1, 1, { 0, 0, "" }, "1", -1, 0, 16, 18, 1, "Version A",
  509. "001111100010001000"
  510. "001010000100010001"
  511. "100010100010001000"
  512. "000110000100010001"
  513. "100010100010111010"
  514. "000010000000100000"
  515. "111111111111111111"
  516. "000000000000000000"
  517. "011111111111111110"
  518. "010000000000000010"
  519. "011111111111111110"
  520. "000100011111101101"
  521. "110101011101100011"
  522. "001011010100100000"
  523. "101000000101100011"
  524. "001110100110110101"
  525. },
  526. /* 10*/ { -1, -1, 2, { 0, 0, "" }, "1", -1, 0, 22, 22, 1, "Version B",
  527. "0011111000100010001000"
  528. "0010100001000100010001"
  529. "1000101000100010001000"
  530. "0001100001000100010001"
  531. "1000101000100010001000"
  532. "0001100001000100010001"
  533. "1000101000100010000101"
  534. "0000100000000000100000"
  535. "1111111111111111111111"
  536. "0000000000000000000000"
  537. "0111111111111111111110"
  538. "0100000000000000000010"
  539. "0111111111111111111110"
  540. "0100000000000000000010"
  541. "0111111111111111111110"
  542. "0001000100010001100011"
  543. "1011100100100100101111"
  544. "1000001000100010101000"
  545. "1000101010001101101011"
  546. "0011100111110001101010"
  547. "0000001101010001100110"
  548. "0001001111111101111101"
  549. },
  550. /* 11*/ { -1, -1, 3, { 0, 0, "" }, "1", -1, 0, 28, 32, 1, "Version C",
  551. "00111110001000100010001000111000"
  552. "00101000010001000100010001100001"
  553. "10001010001000100010001000101000"
  554. "00011000010001000100010001100001"
  555. "10001010001000100010001000101000"
  556. "00011000010001000100010001100001"
  557. "10001010001000100010001000101000"
  558. "00011000010001000100010001100001"
  559. "10001010001000100010001000101000"
  560. "00011000010001000100010001100001"
  561. "00001000000000000000000000100000"
  562. "11111111111111111111111111111111"
  563. "00000000000000000000000000100000"
  564. "11111111111111111111111111111111"
  565. "00000000000000000000000000000000"
  566. "01111111111111111111111111111110"
  567. "01000000000000000000000000000010"
  568. "01111111111111111111111111111110"
  569. "10001010001000100010001000101000"
  570. "00011000010001000100010001100001"
  571. "10001010000011010001010010101000"
  572. "00011000010011100110010111100110"
  573. "10101001001100010000111010101011"
  574. "11111001011001101001001101100100"
  575. "11001011100101010101000111100000"
  576. "01001000010101111111101101101001"
  577. "00001000011000110111001001100111"
  578. "10001110101100110010000011111001"
  579. },
  580. /* 12*/ { -1, -1, 4, { 0, 0, "" }, "1", -1, 0, 40, 42, 1, "Version D",
  581. "001111100010001000101100100010001000111000"
  582. "001010000100010001001001000100010001100001"
  583. "100010100010001000101000100010001000101000"
  584. "000110000100010001001001000100010001100001"
  585. "100010100010001000101000100010001000101000"
  586. "000110000100010001001001000100010001100001"
  587. "100010100010001000101000100010001000101000"
  588. "000110000100010001001001000100010001100001"
  589. "100010100010001000101000100010001000101000"
  590. "000110000100010001001001000100010001100001"
  591. "100010100010001000101000100010001000101000"
  592. "000110000100010001001001000100010001100001"
  593. "100011100010001000101100100010001000111000"
  594. "000110000100010001001001000100010001100001"
  595. "100010100010001000101000100010001000101000"
  596. "000010000000000000001000000000000000100000"
  597. "111111111111111111111111111111111111111111"
  598. "000000000000000000000000000000000000000000"
  599. "011111111111111111111111111111111111111110"
  600. "010000000000000000000000000000000000000010"
  601. "011111111111111111111111111111111111111110"
  602. "010000000000000000000000000000000000000010"
  603. "011111111111111111111111111111111111111110"
  604. "010000000000000000000000000000000000000010"
  605. "011111111111111111111111111111111111111110"
  606. "000110000100010001001001000100010001100001"
  607. "100010100010001000101000100010001000101000"
  608. "000111000100010001001101000100010001110001"
  609. "100010100010001000101000100010001000101000"
  610. "000110000100010001001001000100010001100001"
  611. "100010101001100100001011011010110110100000"
  612. "000110100110101111011011110010011011101001"
  613. "000010010111010100101010110101001011101101"
  614. "000110100010000101111000100111011100101011"
  615. "001110001100000101111001010011111100101011"
  616. "001110011010000011011001001111011001100010"
  617. "110110110000111010011001111100001111101001"
  618. "001110010011111000101011111101110101100100"
  619. "111110111100011110001010001011010010101010"
  620. "001111110100111100111110111101110110111000"
  621. },
  622. /* 13*/ { -1, -1, 5, { 0, 0, "" }, "1", -1, 0, 52, 54, 1, "Version E",
  623. "001111100010001000100010001110001000100010001000111000"
  624. "001010000100010001000100011000010001000100010001100001"
  625. "100010100010001000100010001010001000100010001000101000"
  626. "000110000100010001000100011000010001000100010001100001"
  627. "100010100010001000100010001010001000100010001000101000"
  628. "000110000100010001000100011000010001000100010001100001"
  629. "100010100010001000100010001010001000100010001000101000"
  630. "000110000100010001000100011000010001000100010001100001"
  631. "100010100010001000100010001010001000100010001000101000"
  632. "000110000100010001000100011000010001000100010001100001"
  633. "100010100010001000100010001010001000100010001000101000"
  634. "000110000100010001000100011000010001000100010001100001"
  635. "100011100010001000100010001110001000100010001000111000"
  636. "000110000100010001000100011000010001000100010001100001"
  637. "100010100010001000100010001010001000100010001000101000"
  638. "000110000100010001000100011000010001000100010001100001"
  639. "100010100010001000100010001010001000100010001000101000"
  640. "000110000100010001000100011000010001000100010001100001"
  641. "100010100010001000100010001010001000100010001000101000"
  642. "000110000100010001000100011000010001000100010001100001"
  643. "100010100010001000100010001010001000100010001000101000"
  644. "000010000000000000000000001000000000000000000000100000"
  645. "111111111111111111111111111111111111111111111111111111"
  646. "000000000000000000000000001000000000000000000000000000"
  647. "111111111111111111111111111111111111111111111111111111"
  648. "000000000000000000000000000000000000000000000000000000"
  649. "011111111111111111111111111111111111111111111111111110"
  650. "010000000000000000000000000000000000000000000000000010"
  651. "011111111111111111111111111111111111111111111111111110"
  652. "010000000000000000000000000000000000000000000000000010"
  653. "011111111111111111111111111111111111111111111111111110"
  654. "000110000100010001000100011000010001000100010001100001"
  655. "100010100010001000100010001010001000100010001000101000"
  656. "000110000100010001000100011000010001000100010001100001"
  657. "100010100010001000100010001010001000100010001000101000"
  658. "000110000100010001000100011000010001000100010001100001"
  659. "100010100010001000100010001010001000100010001000101000"
  660. "000110000100010001000100011000010001000100010001100001"
  661. "100010100010001000100010001010001000100010001000101000"
  662. "000111000100010001000100011100010001000100010001110001"
  663. "100010100011001110101101011001001110100110111010100011"
  664. "000110000110110111000001011000110010010101010110100000"
  665. "011110101100010100001110011000100001000000000011101111"
  666. "101010010111001011101001101001011011111100100001100110"
  667. "110010110111001110010010111010101010101111101100101100"
  668. "010010111100101001101011101010101101010000110100100000"
  669. "100010001111111011100100001010111111011111101010101011"
  670. "001110101110001110100000101011001010100011010000101010"
  671. "001010111001011111011100011011011000010001110111100110"
  672. "101110011000100101111110011000100011001011110111101111"
  673. "111110101100111001100001101011110110001010011110100010"
  674. "111111001000100010110011011100010011010001110011110110"
  675. },
  676. /* 14*/ { -1, -1, 6, { 0, 0, "" }, "1", -1, 0, 70, 76, 1, "Version F",
  677. "0011111000100010001000100011100010001000100010001110001000100010001000111000"
  678. "0010100001000100010001000110000100010001000100011000010001000100010001100001"
  679. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  680. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  681. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  682. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  683. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  684. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  685. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  686. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  687. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  688. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  689. "1000111000100010001000100011100010001000100010001110001000100010001000111000"
  690. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  691. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  692. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  693. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  694. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  695. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  696. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  697. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  698. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  699. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  700. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  701. "1000111000100010001000100011100010001000100010001110001000100010001000111000"
  702. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  703. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  704. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  705. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  706. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  707. "0000100000000000000000000010000000000000000000001000000000000000000000100000"
  708. "1111111111111111111111111111111111111111111111111111111111111111111111111111"
  709. "0000000000000000000000000010000000000000000000000000000000000000000000100000"
  710. "1111111111111111111111111111111111111111111111111111111111111111111111111111"
  711. "0000000000000000000000000010000000000000000000000000000000000000000000100000"
  712. "1111111111111111111111111111111111111111111111111111111111111111111111111111"
  713. "0000000000000000000000000000000000000000000000000000000000000000000000000000"
  714. "0111111111111111111111111111111111111111111111111111111111111111111111111110"
  715. "0100000000000000000000000000000000000000000000000000000000000000000000000010"
  716. "0111111111111111111111111111111111111111111111111111111111111111111111111110"
  717. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  718. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  719. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  720. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  721. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  722. "0001110001000100010001000111000100010001000100011100010001000100010001110001"
  723. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  724. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  725. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  726. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  727. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  728. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  729. "1000101000100010001000100010100010001000100010001010001000011011111010101001"
  730. "0001100001000100010001000110000100010001000100011000010001111011011111101101"
  731. "0110101100001000110011100010010001101110011110001010011001110110100001100110"
  732. "1111101111011010000010100010111111101100011011101001001010011000000111100001"
  733. "1101100110100110101000011010111110101010011000011010001011101010101100100001"
  734. "0110111110001001101100001111000011101011100101011101110010001101111001110000"
  735. "0100100100010000000011110010110000101001011011011010110100000101010001101110"
  736. "1110101011010110011110010010101111000100100011011011011011110111000001101010"
  737. "0010101100100000101011100110011110000001100010111000101110111101110110101001"
  738. "0000101100111111111101000010111100010110010000011001110100001110101111101101"
  739. "1101101011000000110000110110010101111111001000111000010110000010100010100100"
  740. "1011100000000011011101000110100110010101001101011001110010010111101101101111"
  741. "1010101001010010110010111110000010100100101111001000101111010101011111100100"
  742. "0001100001110100110100000110010001101111111011101011110000110100110100100000"
  743. "0110101111010001100101000010110001111001111001101011010001001111100001100100"
  744. "1111101011000011001010101110000111001100100011011000010110011100100111101001"
  745. "0100101101010010100110011010000001101000011011111001011101001000011110100101"
  746. "1100111111000110110101110011011001001010010101101111011110000111010100110101"
  747. },
  748. /* 15*/ { -1, -1, 7, { 0, 0, "" }, "1", -1, 0, 104, 98, 1, "Version G",
  749. "00111011001000100010001000111000100010001000100011100010001000100010011010001000100010001011001000"
  750. "00100010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  751. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  752. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  753. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  754. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  755. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  756. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  757. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  758. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  759. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  760. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  761. "10001011001000100010001000111000100010001000100011100010001000100010011010001000100010001011001000"
  762. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  763. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  764. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  765. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  766. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  767. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  768. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  769. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  770. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  771. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  772. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  773. "10001011001000100010001000111000100010001000100011100010001000100010011010001000100010001011001000"
  774. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  775. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  776. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  777. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  778. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  779. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  780. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  781. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  782. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  783. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  784. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  785. "10001011001000100010001000111000100010001000100011100010001000100010011010001000100010001011001000"
  786. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  787. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  788. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  789. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  790. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  791. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  792. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  793. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  794. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  795. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  796. "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
  797. "00000000000000000000000000010000000000000000000000000000000000000000010000000000000000000000000000"
  798. "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
  799. "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
  800. "01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110"
  801. "01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
  802. "01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110"
  803. "01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
  804. "01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110"
  805. "01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
  806. "01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110"
  807. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  808. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  809. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  810. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  811. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  812. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  813. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  814. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  815. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  816. "00010011010001000100010001011001000100010001000111000100010001000100011100010001000100010011010001"
  817. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  818. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  819. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  820. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  821. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  822. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  823. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  824. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  825. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  826. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  827. "10001010001000100010001000010011110011001100000110110111011101100001110001100110110000100010100010"
  828. "00010011010001000100010001111101100110011001111111101110111011010110011110011001000000010011010001"
  829. "11110010000000000000111011110011101110011001100110100111000010001000110010100010001000101110101001"
  830. "11101010001000100001011001110001100110010110011010011010010101010101010101010110011001101110110001"
  831. "10011010011111000100010001110001111111111111000010011101110111111100110000100010010110101010101010"
  832. "00010010010010011101110111010100100110011001000110001100110011100100010100010001110111101110101110"
  833. "01001110101110111011100110010110011010100011001110001111001101110111010101011101110111010010110011"
  834. "00101010101010101001111111110111111110000101010110010100010110011001110011101101110111010010110001"
  835. "00110010111001100110011001110001010101010101101010010001000100101000010100010001000101110110110111"
  836. "00010010010000111011101110110000100110011001011110111011101110101010110010101010101010011010011001"
  837. "11010110110111011110100000010000000011011011101110101100110010001000110001010101010101011010101000"
  838. "11111110111111111111010001010001000110000110011010011001011101110111010101010110011001100010110010"
  839. "10001010000100110111011101110110100110011001001010011101110111000001110001100110000011111110111111"
  840. "00100011101011100110011001011101100110011001101111011101110111100111111011101110110010011011011001"
  841. "11110010000000000000101010110010101001111101110110110110100101010101010110100101010101010010101011"
  842. "11000010100010001000010100010100010000110101010110010101110001000100010100001110111011100010001110"
  843. "10111010110001100010001000110101001100110011100110110011001100010001110001100110010100000010000000"
  844. "11101110101110101010101010110110010001000100110110111111111111101100110000100010000101110110110111"
  845. "00010010100010001001010010010010001001000110011010011000000101010101010101110001000100010110001000"
  846. "01110110010101010110101011110011101111101110111010111001100010001000110001000111011101111010001001"
  847. "10001010001000111011101110010100100010001000011110111111111111111101010101010101101001110110110111"
  848. "10011010010001101010101010110001011101110111000110110111011101111001010101010101111011011110011101"
  849. "10010010010001000101011000110000100011011100110010110011110111011101110100110000000000001110010101"
  850. "11111110111111111100010011010011001100000000000010000000001101110111010111111100110011001110010101"
  851. "01010110010110111111111111010101011001100110011010000000000000001110010010001000011000100010100010"
  852. "01010111011110111111111111111010000100010001111011010001000100000111011011001100100100010011010001"
  853. },
  854. /* 16*/ { -1, -1, 8, { 0, 0, "" }, "1", -1, 0, 148, 134, 1, "Version H",
  855. "00111011001000100010001000111000100010001000101100100010001000100011100010001000100010110010001000100010001110001000100010001011001000"
  856. "00100010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  857. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  858. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  859. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  860. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  861. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  862. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  863. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  864. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  865. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  866. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  867. "10001011001000100010001000111000100010001000101100100010001000100011100010001000100010110010001000100010001110001000100010001011001000"
  868. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  869. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  870. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  871. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  872. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  873. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  874. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  875. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  876. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  877. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  878. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  879. "10001011001000100010001000111000100010001000101100100010001000100011100010001000100010110010001000100010001110001000100010001011001000"
  880. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  881. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  882. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  883. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  884. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  885. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  886. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  887. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  888. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  889. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  890. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  891. "10001011001000100010001000111000100010001000101100100010001000100011100010001000100010110010001000100010001110001000100010001011001000"
  892. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  893. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  894. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  895. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  896. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  897. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  898. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  899. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  900. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  901. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  902. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  903. "10001011001000100010001000111000100010001000101100100010001000100011100010001000100010110010001000100010001110001000100010001011001000"
  904. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  905. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  906. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  907. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  908. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  909. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  910. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  911. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  912. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  913. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  914. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  915. "10001011001000100010001000111000100010001000101100100010001000100011100010001000100010110010001000100010001110001000100010001011001000"
  916. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  917. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  918. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  919. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  920. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  921. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  922. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  923. "00000010000000000000000000100000000000000000001000000000000000000010000000000000000000100000000000000000001000000000000000000010000000"
  924. "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
  925. "00000000000000000000000000100000000000000000000000000000000000000010000000000000000000000000000000000000001000000000000000000000000000"
  926. "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
  927. "00000000000000000000000000100000000000000000000000000000000000000010000000000000000000000000000000000000001000000000000000000000000000"
  928. "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
  929. "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
  930. "01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110"
  931. "01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
  932. "01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110"
  933. "01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
  934. "01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110"
  935. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  936. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  937. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  938. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  939. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  940. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  941. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  942. "00010011010001000100010001110001000100010001001101000100010001000111000100010001000100110100010001000100011100010001000100010011010001"
  943. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  944. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  945. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  946. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  947. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  948. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  949. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  950. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  951. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  952. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  953. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  954. "00010011010001000100010001110001000100010001001101000100010001000111000100010001000100110100010001000100011100010001000100010011010001"
  955. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  956. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  957. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  958. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  959. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  960. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  961. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  962. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  963. "10001010001000100010001000101000100010001000101000100010001000100010100010001000100010100010001000100010001010001000100010001010001000"
  964. "00010010010001000100010001100001000100010001001001000100010001000110000100010001000100100100010001000100011000010001000100010010010001"
  965. "10001010001000100010001000101000100010001000011010111111111111111110111111111111101010100110011001100110011010011001011011001110001100"
  966. "00010011010001000100010001110001000100010001111110110111011101110111110111011101111111110111011101110111011111011101111111111111111111"
  967. "11001110001100110000100011100011001100110011001011001100111000100010100010001000100010100001000110011001101001100110011001101110100111"
  968. "11111110111111111101101000101000100010001000101000100000101000100010100010001000100010100011111110111011101011101110111011101110000110"
  969. "01110110110111011101110111101000100110011001101001100110011001100110110111011101110111100111011101101000011000010001000100010010010001"
  970. "01100110100110011001100110101110010001000100011000010001000100101010011001100110011001101001100110000001111001110111011101110110110111"
  971. "01101110011101110111011101101101110101101001101001100110011001100110100110101000100010100010001000100010001001101111111111111110111111"
  972. "00010110100110011001100110100110011011100010001010001000100010001010001001101100110011100011001100110011001000110000000000000010000000"
  973. "11111110111010101010101010101010101010101010011010000100010001000110000100010001100010101110111011101110111010111011101010101010101010"
  974. "00000010001110101110111011101011101110111011101001010101010101010110010101010101011100101000100010001000101000100010001101110110110111"
  975. "10101010101010101011000001100001000100010001001001000101000100010010010001000100010001100001000000000000001000000000000000000010111100"
  976. "01110110110111011110010000100000000000000000001000000011101011101110101110111011101110101101011001100110011010011001100110011110100100"
  977. "11001110001100110011001100101100001000100010001010001000100010100110011001100110011001101001100110110110111010111011101110111010111011"
  978. "01000111000100010001000100111011110011001100111100110011001100010011100010001000100010110010001000110111011111011101110111011111011101"
  979. "01000010010001000100010001100001000101010001001001000100010001000110000111100010001000101000100010001000101011001000100010001010001000"
  980. "10111110011101110111011101101101110111000001001001000100010001000110000110100000000000100000000000000000001011001111111111111110111111"
  981. "10001010000010101110111011101011101110111011101001011101110111011110011101110111100000100100010001000100011000010001100010111010111011"
  982. "11111110111111110111011101101101110111011101001000111111111111111110111111111111000101101001100110011001101001100110010000010010010001"
  983. "10111010111011101100101110101110111011101110111010111011110111011110011101110111011101101101101001100110011010011001100110011110011011"
  984. "00010010010001000101110100100100010001000100011000010000111010101010101010101010101010101011111101110111011011011101110111011010110000"
  985. "10111010111011101110111011100000001100110011001011001100110011000010110111011101110111100111011101010101111001110111011101110110110111"
  986. "00000010000000000000000000100000110111011101111001110111011101110110000100010001000100100100010001100110011010011001100110011010011001"
  987. "11110010100010001000100010100010001000110001001001000100010001000110000101100000000000100000000000000000001010100010001000100010100010"
  988. "01010010110011001100110011100011001101010111011011011101110111011110011100100101010101100101010101010101011011101101110111011110011101"
  989. "00100010100100101010101010101010101010101010101001010001000100010010010001000100101100101000100010001000101000100010111100000010000000"
  990. "11011111011111000100010001110001000100010001001101110111011101110111110111011101001101110001000100010001001101000100000101000111000100"
  991. "00000010000000000010100100100100010001000100011000010010111100110010110011001100110011100000101111111111111011111111111111110110010101"
  992. "01000110000100010001101111101111111111111111111011111111101110111010111011101110111011101011110000000000001000000000000000001110010011"
  993. "01010110010101010101010101101111010001000100011000010001000100011010111111111111111111101111111111010001101001100110011001100110100110"
  994. "00110010110011001100110011100100000000000000001000000000000000111110101110111011101110101110111011000011001011001100110011001110001100"
  995. "01010010000000000000000000100000000011000111011011011101110111011110011110011110111011101011101110111011101001101101110111011110011101"
  996. "10101010111011101110111011101011101100011100111000110011001100110010110011001000100010100010001000100010001011010001000100010010010001"
  997. "11011110010001001100110011100011001100110011111010000100010001000110000100010001010001100001000100010001001001000100110101000110000100"
  998. "00010010010110011101110111100111011101110111001010011101110111011110011101110111100111100011001100110011001011001100111100010010010001"
  999. "01000110000100010010100110100110011001100110011010011001100000000010000000000000000000100001101000100010001010001000100010000110101111"
  1000. "00010010010001000110110101100101010101010101011001010111000110011010011001100110011001101001001010101010101010101010101010100110010110"
  1001. "11111110111111111111111111100101110111011101111001110111011101001010000100010001000100100100010001111001011001010101010101010110010101"
  1002. "01100111100110011001100110111101111011101110111110111011101110000111110111011101110111110111011101010001011101010101010101010111010101"
  1003. },
  1004. /* 17*/ { -1, -1, 9, { 0, 0, "" }, "123456", -1, 0, 8, 11, 1, "Version S-10",
  1005. "00011110000"
  1006. "11000010001"
  1007. "10100011100"
  1008. "11000011000"
  1009. "00000000000"
  1010. "11111111111"
  1011. "10000000001"
  1012. "10111111101"
  1013. },
  1014. /* 18*/ { -1, -1, 9, { 0, 0, "" }, "123456789012", -1, 0, 8, 21, 1, "Version S-20",
  1015. "000101110111000010010"
  1016. "110101100101011000101"
  1017. "100000101001110101100"
  1018. "010110101001010001000"
  1019. "000000000010000000000"
  1020. "111111111111111111111"
  1021. "100000000000000000001"
  1022. "101111111111111111101"
  1023. },
  1024. /* 19*/ { -1, -1, 9, { 0, 0, "" }, "123456789012345678", -1, 0, 8, 31, 1, "Version S-30",
  1025. "0000110111010011100000001111001"
  1026. "1110100011011100110110110010111"
  1027. "1111100010010100111000011001010"
  1028. "1101100000010010010111110001110"
  1029. "0000000000000001000000000000000"
  1030. "1111111111111111111111111111111"
  1031. "1000000000000001000000000000001"
  1032. "1011111111111111111111111111101"
  1033. },
  1034. /* 20*/ { -1, -1, 10, { 0, 0, "" }, "ABCDEFGHIJKLM", -1, 0, 16, 17, 1, "Version T-16",
  1035. "11100101111100110"
  1036. "01101001010011101"
  1037. "00101000001011001"
  1038. "01000000011110011"
  1039. "10010100010001011"
  1040. "10101110001001010"
  1041. "00101001001001110"
  1042. "01101110011001011"
  1043. "01111001001110011"
  1044. "10000001001101001"
  1045. "00000000100000000"
  1046. "11111111111111111"
  1047. "10000000000000001"
  1048. "10111111111111101"
  1049. "10000000000000001"
  1050. "10111111111111101"
  1051. },
  1052. /* 21*/ { -1, -1, 10, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGH", -1, 0, 16, 33, 1, "Version T-32",
  1053. "111001011110011010010100001011001"
  1054. "011010011001110100100000011110011"
  1055. "100110101101101100001110001001110"
  1056. "101001100101101000000110110110000"
  1057. "100011111010011000101011110000100"
  1058. "011000110111000000010001111011001"
  1059. "010000111111100101010011010011101"
  1060. "010110011111011000010111100011110"
  1061. "000110111101100001011011000011000"
  1062. "101111100010010000100011100000110"
  1063. "000000000000000010000000000000000"
  1064. "111111111111111111111111111111111"
  1065. "100000000000000010000000000000001"
  1066. "101111111111111111111111111111101"
  1067. "100000000000000000000000000000001"
  1068. "101111111111111111111111111111101"
  1069. },
  1070. /* 22*/ { -1, -1, 10, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABC", -1, 0, 16, 49, 1, "Version T-48",
  1071. "1110010111100110001010001010110011001101011011011"
  1072. "0110100110011101010000000111100111010011001011010"
  1073. "0001110001001110100011110101001100101011110001000"
  1074. "0000110110110000011000110011100000010001111010110"
  1075. "1100100100001010001111000011111011011111011101111"
  1076. "1000101000111101111000000100100110100011011110110"
  1077. "0000010001110011111001000001000010101000001001110"
  1078. "0000010010111000001000100100111111001101000110011"
  1079. "0101010011001000001111000100101010001011010001111"
  1080. "1100010001111110010001100010011010010011101100110"
  1081. "0000000000000000000000001000000000000000000000000"
  1082. "1111111111111111111111111111111111111111111111111"
  1083. "1000000000000000000000001000000000000000000000001"
  1084. "1011111111111111111111111111111111111111111111101"
  1085. "1000000000000000000000001000000000000000000000001"
  1086. "1011111111111111111111111111111111111111111111101"
  1087. },
  1088. /* 23*/ { -1, -1, -1, { 0, 0, "" }, "123456789012", -1, 0, 16, 18, 1, "ASCII double digits",
  1089. "100011101010111101"
  1090. "111010010010100000"
  1091. "110110100010001000"
  1092. "110010111000010001"
  1093. "100010100011010100"
  1094. "000010000000100000"
  1095. "111111111111111111"
  1096. "000000000000000000"
  1097. "011111111111111110"
  1098. "010000000000000010"
  1099. "011111111111111110"
  1100. "000100010100100101"
  1101. "011001001110101101"
  1102. "011010010010101111"
  1103. "010111110100100111"
  1104. "100010001101111100"
  1105. },
  1106. /* 24*/ { -1, -1, -1, { 0, 0, "" }, "1234567890123", -1, 0, 16, 18, 1, "DECIMAL (numeric ending >= 13)",
  1107. "111111111111001100"
  1108. "000110000110010101"
  1109. "100010110111011000"
  1110. "000010111100010001"
  1111. "100010100011100101"
  1112. "000010000000100000"
  1113. "111111111111111111"
  1114. "000000000000000000"
  1115. "011111111111111110"
  1116. "010000000000000010"
  1117. "011111111111111110"
  1118. "000100011011101000"
  1119. "110111100101101000"
  1120. "011011111110101010"
  1121. "011011110100101000"
  1122. "010000100100111111"
  1123. },
  1124. /* 25*/ { -1, -1, -1, { 0, 0, "" }, "1234567890123A", -1, 0, 16, 18, 1, "ASCII (ending not fully numeric)",
  1125. "100011101010111101"
  1126. "111010010010100000"
  1127. "110110100000110100"
  1128. "110010111001000010"
  1129. "100010100011101100"
  1130. "000010000000100000"
  1131. "111111111111111111"
  1132. "000000000000000000"
  1133. "011111111111111110"
  1134. "010000000000000010"
  1135. "011111111111111110"
  1136. "000100010110100100"
  1137. "010101000111101010"
  1138. "001001000010100110"
  1139. "001101100111101010"
  1140. "010000000011110011"
  1141. },
  1142. /* 26*/ { -1, -1, -1, { 0, 0, "" }, "GOSGOS", -1, 0, 16, 18, 1, "2 C40 triplets, C40 at end, buffer empty, switch to ASCII before padding (5)",
  1143. "111011100010001000"
  1144. "011010000100010001"
  1145. "100010111110001000"
  1146. "000110111100010001"
  1147. "100010100000100111"
  1148. "000010000000100000"
  1149. "111111111111111111"
  1150. "000000000000000000"
  1151. "011111111111111110"
  1152. "010000000000000010"
  1153. "011111111111111110"
  1154. "000100010010100000"
  1155. "011011101100100111"
  1156. "111111101001100010"
  1157. "110101010100101011"
  1158. "100110001001111001"
  1159. },
  1160. /* 27*/ { -1, -1, -1, { 0, 0, "" }, "GOSGOSG", -1, 0, 16, 18, 1, "2 C40 triplets + C40 singlet, C40 at end, singlet in buffer, switch to ASCII before padding (3)",
  1161. "111011100010001000"
  1162. "011010000100010001"
  1163. "100010111101001000"
  1164. "000110111110000001"
  1165. "100010100011000101"
  1166. "000010000000100000"
  1167. "111111111111111111"
  1168. "000000000000000000"
  1169. "011111111111111110"
  1170. "010000000000000010"
  1171. "011111111111111110"
  1172. "000100011111101011"
  1173. "010101100101101111"
  1174. "110010101010101010"
  1175. "001000000101101010"
  1176. "100101111101110001"
  1177. },
  1178. /* 28*/ { -1, -1, -1, { 0, 0, "" }, "GOSGOSGO", -1, 0, 16, 18, 1, "2 C40 triplets + C40 doublet, C40 at end, doublet in buffer, switch to ASCII for doublet (2 pad)",
  1179. "111011100010001000"
  1180. "011010000100010001"
  1181. "100010111101000101"
  1182. "000110111110000000"
  1183. "100010100010100100"
  1184. "000010000000100000"
  1185. "111111111111111111"
  1186. "000000000000000000"
  1187. "011111111111111110"
  1188. "010000000000000010"
  1189. "011111111111111110"
  1190. "000100010000100010"
  1191. "010011110001101000"
  1192. "101110101100101111"
  1193. "110011010011101110"
  1194. "010001011100111100"
  1195. },
  1196. /* 29*/ { -1, -1, -1, { 0, 0, "" }, "GOSGOSGOS", -1, 0, 16, 18, 1, "3 C40 triplets, C40 at end, switch to ASCII before padding (3)",
  1197. "111011100010001000"
  1198. "011010000100010001"
  1199. "100010100010001111"
  1200. "000110000100011111"
  1201. "100010100001110000"
  1202. "000010000000100000"
  1203. "111111111111111111"
  1204. "000000000000000000"
  1205. "011111111111111110"
  1206. "010000000000000010"
  1207. "011111111111111110"
  1208. "000100010100100101"
  1209. "011101101001100111"
  1210. "110000000100101000"
  1211. "000011011111101011"
  1212. "000011110110110001"
  1213. },
  1214. /* 30*/ { -1, -1, -1, { 0, 0, "" }, "GOSGOSGOSG", -1, 0, 16, 18, 1, "3 C40 triplets + C40 singlet, C40 at end, singlet in buffer, switch to ASCII for singlet (1 pad)",
  1215. "111011100010001000"
  1216. "011010000100010001"
  1217. "100010100010001111"
  1218. "000110000100011111"
  1219. "010010100000100001"
  1220. "000010000000100000"
  1221. "111111111111111111"
  1222. "000000000000000000"
  1223. "011111111111111110"
  1224. "010000000000000010"
  1225. "011111111111111110"
  1226. "100000011011100000"
  1227. "001111100101101101"
  1228. "000001100100100010"
  1229. "101001010011100111"
  1230. "101111111001110110"
  1231. },
  1232. /* 31*/ { -1, -1, -1, { 0, 0, "" }, "GOSGOSGOSGO", -1, 0, 16, 18, 1, "3 C40 triplets + C40 doublet, C40 at end, doublet in buffer, switch to ASCII for doublet (0 pad)",
  1233. "111011100010001000"
  1234. "011010000100010001"
  1235. "100010100010001111"
  1236. "000110000100011111"
  1237. "010010010111000001"
  1238. "000010000000100000"
  1239. "111111111111111111"
  1240. "000000000000000000"
  1241. "011111111111111110"
  1242. "010000000000000010"
  1243. "011111111111111110"
  1244. "100000000011101010"
  1245. "110111111011100101"
  1246. "111101001000101111"
  1247. "110000011111100011"
  1248. "001001001110111100"
  1249. },
  1250. /* 32*/ { -1, -1, -1, { 0, 0, "" }, "GOSGOSGOSGOS", -1, 0, 16, 18, 1, "4 C40 triplets, C40 at end, empty buffer, switch to ASCII before padding (1)",
  1251. "111011100010001000"
  1252. "011010000100010001"
  1253. "100010100010001000"
  1254. "000110000100010001"
  1255. "100010111100100001"
  1256. "000010000000100000"
  1257. "111111111111111111"
  1258. "000000000000000000"
  1259. "011111111111111110"
  1260. "010000000000000010"
  1261. "011111111111111110"
  1262. "000111111110100010"
  1263. "101010100011101010"
  1264. "111100000000101011"
  1265. "001010101010101001"
  1266. "110011100111110100"
  1267. },
  1268. /* 33*/ { -1, -1, -1, { 0, 0, "" }, ".GOSGOSGOSGOS", -1, 0, 16, 18, 1, "ASCII + 4 C40 triplets, C40 at end, empty buffer, no switch to ASCII as no padding",
  1269. "001011111010001000"
  1270. "111110011000010001"
  1271. "100010100010001000"
  1272. "000110000100010001"
  1273. "100010100010110100"
  1274. "000010000000100000"
  1275. "111111111111111111"
  1276. "000000000000000000"
  1277. "011111111111111110"
  1278. "010000000000000010"
  1279. "011111111111111110"
  1280. "000100010111101010"
  1281. "011010010011100110"
  1282. "000110111100100111"
  1283. "111011101001100000"
  1284. "010001000011110110"
  1285. },
  1286. /* 34*/ { -1, -1, -1, { 0, 0, "" }, "ABCDEFGHIJ\001K", -1, 0, 16, 18, 1, "4 C40 triplets (last shifted) + singlet, no unlatch, singlet as ASCII, no padding",
  1287. "111011010111100110"
  1288. "011010100110011101"
  1289. "001010100001011000"
  1290. "010010000011111111"
  1291. "110010010000111101"
  1292. "000010000000100000"
  1293. "111111111111111111"
  1294. "000000000000000000"
  1295. "011111111111111110"
  1296. "010000000000000010"
  1297. "011111111111111110"
  1298. "001011001010100001"
  1299. "101001001111101001"
  1300. "101110101101100110"
  1301. "001100001010100011"
  1302. "001001000000110110"
  1303. },
  1304. /* 35*/ { -1, -1, -1, { 0, 0, "" }, "ABCDEFGHIJK\001", -1, 0, 22, 22, 1, "4 C40 triplets + singlet (shifted), backtrack to 3rd triplet and ASCII encode",
  1305. "1110110101111001100010"
  1306. "0110101001100111010100"
  1307. "1000100101111101000100"
  1308. "0000101111111110111100"
  1309. "0000101000100010001000"
  1310. "0010100001000100010001"
  1311. "1000101000100010000000"
  1312. "0000100000000000100000"
  1313. "1111111111111111111111"
  1314. "0000000000000000000000"
  1315. "0111111111111111111110"
  1316. "0100000000000000000010"
  1317. "0111111111111111111110"
  1318. "0100000000000000000010"
  1319. "0111111111111111111110"
  1320. "0001000100010001101001"
  1321. "1010111010001011101100"
  1322. "0011100100111011101111"
  1323. "1001100110000000101001"
  1324. "1100001010011100100111"
  1325. "0011000011111010101111"
  1326. "1111110001000011110110"
  1327. },
  1328. /* 36*/ { -1, -1, -1, { 0, 0, "" }, "ABCDEFGH\001I\001", -1, 0, 22, 22, 1, "4 C40 triplets + singlet (shifted), backtrack to 2nd triplet and ASCII encode",
  1329. "1110110101111001100010"
  1330. "0110101001100111010100"
  1331. "1111100100010000000100"
  1332. "1111101000100100101010"
  1333. "0000101000100010001000"
  1334. "0010100001000100010001"
  1335. "1000101000100010001010"
  1336. "0000100000000000100000"
  1337. "1111111111111111111111"
  1338. "0000000000000000000000"
  1339. "0111111111111111111110"
  1340. "0100000000000000000010"
  1341. "0111111111111111111110"
  1342. "0100000000000000000010"
  1343. "0111111111111111111110"
  1344. "0001000100010001101011"
  1345. "0110001001011110100100"
  1346. "0000011100110101101011"
  1347. "0100111101001101101110"
  1348. "0010001000101001101100"
  1349. "1110110010000110101011"
  1350. "1001100010111000111111"
  1351. },
  1352. /* 37*/ { -1, -1, -1, { 0, 0, "" }, "\101\102\103\104\105\106\107\110\200\101\102", -1, 0, 22, 22, 1, "'ABCDEFGH<80>AB' - cte_buffer_transfer with cte_p > 3",
  1353. "1110110101111001100010"
  1354. "0110101001100111010100"
  1355. "1000100100101110001111"
  1356. "0000101010101100011111"
  1357. "0100100100100010001000"
  1358. "0010100011000100010001"
  1359. "1000101000100010000110"
  1360. "0000100000000000100000"
  1361. "1111111111111111111111"
  1362. "0000000000000000000000"
  1363. "0111111111111111111110"
  1364. "0100000000000000000010"
  1365. "0111111111111111111110"
  1366. "0100000000000000000010"
  1367. "0111111111111111111110"
  1368. "0001000100010001100101"
  1369. "1010111100010110100110"
  1370. "1001111110011001100011"
  1371. "1101111110111000100101"
  1372. "1010110011101001101111"
  1373. "0111100000001001101001"
  1374. "0101000100001100110110"
  1375. },
  1376. /* 38*/ { -1, -1, -1, { 0, 0, "" }, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 22, 22, 1, "7 EDI triplets + doublet, doublet encoded as triplet with Shift 0 pad, no switch to ASCII, no padding",
  1377. "1110110101111001100010"
  1378. "0110101001100111010100"
  1379. "1000100101100110011010"
  1380. "0000101111001110100110"
  1381. "1101101011000111000100"
  1382. "0101101010000011011011"
  1383. "1110101000111110011010"
  1384. "0000100000000000100000"
  1385. "1111111111111111111111"
  1386. "0000000000000000000000"
  1387. "0111111111111111111110"
  1388. "0100000000000000000010"
  1389. "0111111111111111111110"
  1390. "0100000000000000000010"
  1391. "0111111111111111111110"
  1392. "0000011000111001101001"
  1393. "0110011000110111101101"
  1394. "0011100111101100101101"
  1395. "1110111011011111101110"
  1396. "0011000011001101101000"
  1397. "0101100011001011101100"
  1398. "0100011100011000110110"
  1399. },
  1400. /* 39*/ { -1, -1, -1, { 0, 0, "" }, "gosgos", -1, 0, 16, 18, 1, "2 TEXT triplets, TEXT at end, buffer empty, switch to ASCII before padding",
  1401. "111011100010001000"
  1402. "111110000100010001"
  1403. "100010111110001000"
  1404. "000110111100010001"
  1405. "100010100010011101"
  1406. "000010000000100000"
  1407. "111111111111111111"
  1408. "000000000000000000"
  1409. "011111111111111110"
  1410. "010000000000000010"
  1411. "011111111111111110"
  1412. "000100011000101000"
  1413. "110001011110101111"
  1414. "000001000110100100"
  1415. "000011110000100010"
  1416. "101100010110111010"
  1417. },
  1418. /* 40*/ { -1, -1, -1, { 0, 0, "" }, "gosgosg", -1, 0, 16, 18, 1, "2 TEXT triplets + TEXT singlet, TEXT at end, singlet in buffer, switch to ASCII for singlet (3 pads)",
  1419. "111011100010001000"
  1420. "111110000100010001"
  1421. "100010111101101000"
  1422. "000110111110000001"
  1423. "100010100010000100"
  1424. "000010000000100000"
  1425. "111111111111111111"
  1426. "000000000000000000"
  1427. "011111111111111110"
  1428. "010000000000000010"
  1429. "011111111111111110"
  1430. "000100011010100100"
  1431. "000110100011100010"
  1432. "011000001111100101"
  1433. "100100000110100110"
  1434. "010101111001110000"
  1435. },
  1436. /* 41*/ { -1, -1, -1, { 0, 0, "" }, "gosgosgo", -1, 0, 16, 18, 1, "2 TEXT triplets + TEXT doublet, TEXT at end, doublet in buffer, switch to ASCII for doublet, (2 pads)",
  1437. "111011100010001000"
  1438. "111110000100010001"
  1439. "100010111101100111"
  1440. "000110111110000000"
  1441. "100010100010110111"
  1442. "000010000000100000"
  1443. "111111111111111111"
  1444. "000000000000000000"
  1445. "011111111111111110"
  1446. "010000000000000010"
  1447. "011111111111111110"
  1448. "000100011100101000"
  1449. "011110111111100101"
  1450. "110000110110101111"
  1451. "010010000000100110"
  1452. "101001101001111111"
  1453. },
  1454. /* 42*/ { -1, -1, -1, { 0, 0, "" }, ".gosgosgosgos", -1, 0, 16, 18, 1, "ASCII + 4 TEXT triplets, TEXT at end, empty buffer, no switch to ASCII as no padding",
  1455. "001011111010001000"
  1456. "111110111100010001"
  1457. "100010100010001000"
  1458. "000110000100010001"
  1459. "100010100000011010"
  1460. "000010000000100000"
  1461. "111111111111111111"
  1462. "000000000000000000"
  1463. "011111111111111110"
  1464. "010000000000000010"
  1465. "011111111111111110"
  1466. "000100010101101100"
  1467. "111000100010101011"
  1468. "010110110001101110"
  1469. "010110000001101110"
  1470. "111001010101110110"
  1471. },
  1472. /* 43*/ { -1, -1, -1, { 0, 0, "" }, "\015*>", -1, 0, 16, 18, 1, "1 EDI triplet, ASCII mode",
  1473. "000011001000111000"
  1474. "111010101111110001"
  1475. "100010100010001000"
  1476. "000110000100010001"
  1477. "100010100011101000"
  1478. "000010000000100000"
  1479. "111111111111111111"
  1480. "000000000000000000"
  1481. "011111111111111110"
  1482. "010000000000000010"
  1483. "011111111111111110"
  1484. "000100011010100110"
  1485. "011111010100100100"
  1486. "011000001001100100"
  1487. "111000011101100111"
  1488. "101001101110111110"
  1489. },
  1490. /* 44*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015", -1, 0, 16, 18, 1, "1 EDI triplet + singlet, ASCII mode",
  1491. "000011001000110000"
  1492. "111010101111111110"
  1493. "100010100010001000"
  1494. "000110000100010001"
  1495. "100010100001100100"
  1496. "000010000000100000"
  1497. "111111111111111111"
  1498. "000000000000000000"
  1499. "011111111111111110"
  1500. "010000000000000010"
  1501. "011111111111111110"
  1502. "000100011110101100"
  1503. "011000011100100011"
  1504. "101010110001100011"
  1505. "000110111010101011"
  1506. "101001000010111001"
  1507. },
  1508. /* 45*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*", -1, 0, 16, 18, 1, "1 EDI triplet + doublet, ASCII mode",
  1509. "000011001000110000"
  1510. "111010101111111110"
  1511. "001010100010001000"
  1512. "101110000100010001"
  1513. "100010100001010000"
  1514. "000010000000100000"
  1515. "111111111111111111"
  1516. "000000000000000000"
  1517. "011111111111111110"
  1518. "010000000000000010"
  1519. "011111111111111110"
  1520. "000100011011100010"
  1521. "111101001110101111"
  1522. "101010110001101100"
  1523. "101100010011101101"
  1524. "000010101011111010"
  1525. },
  1526. /* 46*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>", -1, 0, 16, 18, 1, "2 EDI triplets, EDI mode",
  1527. "111011000000100000"
  1528. "111010000010110000"
  1529. "001010111110001000"
  1530. "101110111100010001"
  1531. "100010100011001100"
  1532. "000010000000100000"
  1533. "111111111111111111"
  1534. "000000000000000000"
  1535. "011111111111111110"
  1536. "010000000000000010"
  1537. "011111111111111110"
  1538. "000100010110101111"
  1539. "100010111100100100"
  1540. "000001000000101011"
  1541. "111000010111100010"
  1542. "110010111011111011"
  1543. },
  1544. /* 47*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>\015", -1, 0, 16, 18, 1, "2 EDI triplets + singlet, EDI mode + final ASCII",
  1545. "111011000000100000"
  1546. "111010000010110000"
  1547. "001010111100001000"
  1548. "101110111111100001"
  1549. "100010100000101110"
  1550. "000010000000100000"
  1551. "111111111111111111"
  1552. "000000000000000000"
  1553. "011111111111111110"
  1554. "010000000000000010"
  1555. "011111111111111110"
  1556. "000100010111100011"
  1557. "111011011010101001"
  1558. "011110010100100101"
  1559. "011111001000100110"
  1560. "100011100011110000"
  1561. },
  1562. /* 48*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>\015*", -1, 0, 16, 18, 1, "2 EDI triplets + doublet, EDI + final 2 ASCII",
  1563. "111011000000100000"
  1564. "111010000010110000"
  1565. "001010111100000010"
  1566. "101110111111101011"
  1567. "100010100000111001"
  1568. "000010000000100000"
  1569. "111111111111111111"
  1570. "000000000000000000"
  1571. "011111111111111110"
  1572. "010000000000000010"
  1573. "011111111111111110"
  1574. "000100010110100110"
  1575. "000010000001101101"
  1576. "001001011010101001"
  1577. "101001000000100011"
  1578. "100011000010110110"
  1579. },
  1580. /* 49*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>\015*>", -1, 0, 16, 18, 1, "3 EDI triplets, EDI mode",
  1581. "111011000000100000"
  1582. "111010000010110000"
  1583. "001010000000101111"
  1584. "101110000010111111"
  1585. "100010100011011101"
  1586. "000010000000100000"
  1587. "111111111111111111"
  1588. "000000000000000000"
  1589. "011111111111111110"
  1590. "010000000000000010"
  1591. "011111111111111110"
  1592. "000100011110100100"
  1593. "100101000000101000"
  1594. "110101100111101110"
  1595. "110110000011100000"
  1596. "110111100010110011"
  1597. },
  1598. /* 50*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>\015*>\015", -1, 0, 16, 18, 1, "3 EDI triplets + singlet, EDI mode + final ASCII singlet",
  1599. "111011000000100000"
  1600. "111010000010110000"
  1601. "001010000000101111"
  1602. "101110000010111111"
  1603. "000010100000001001"
  1604. "000010000000100000"
  1605. "111111111111111111"
  1606. "000000000000000000"
  1607. "011111111111111110"
  1608. "010000000000000010"
  1609. "011111111111111110"
  1610. "111000011011101000"
  1611. "110001100000101111"
  1612. "101111100101100001"
  1613. "000101100111100111"
  1614. "011010010010111010"
  1615. },
  1616. /* 51*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>\015*>\015*>", -1, 0, 16, 18, 1, "4 EDI triplets, EDI mode",
  1617. "111011000000100000"
  1618. "111010000010110000"
  1619. "001010000000100000"
  1620. "101110000010110000"
  1621. "001010111110000011"
  1622. "000010000000100000"
  1623. "111111111111111111"
  1624. "000000000000000000"
  1625. "011111111111111110"
  1626. "010000000000000010"
  1627. "011111111111111110"
  1628. "101111110110100011"
  1629. "100100100001101111"
  1630. "010001111111101001"
  1631. "100000101110101011"
  1632. "110001000001111000"
  1633. },
  1634. /* 52*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>\015*>\015*>\015", -1, 0, 16, 18, 1, "4 EDI triplets + singlet, EDI mode + nolatch final ASCII singlet (last data codeword of symbol)",
  1635. "111011000000100000"
  1636. "111010000010110000"
  1637. "001010000000100000"
  1638. "101110000010110000"
  1639. "001010000011000011"
  1640. "000010000000100000"
  1641. "111111111111111111"
  1642. "000000000000000000"
  1643. "011111111111111110"
  1644. "010000000000000010"
  1645. "011111111111111110"
  1646. "101111101001101110"
  1647. "111111010000101000"
  1648. "000011011011101101"
  1649. "010111001011101001"
  1650. "101010110001111100"
  1651. },
  1652. /* 53*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>\015*>\015*>\015*", -1, 0, 22, 22, 1, "4 EDI triplets + doublet, EDI mode + final 2 ASCII",
  1653. "1110110000001000000010"
  1654. "1110100000101100001011"
  1655. "0000100010000000101111"
  1656. "0000101011000010111111"
  1657. "0000100010100010001000"
  1658. "1110101011000100010001"
  1659. "1000101000100010001010"
  1660. "0000100000000000100000"
  1661. "1111111111111111111111"
  1662. "0000000000000000000000"
  1663. "0111111111111111111110"
  1664. "0100000000000000000010"
  1665. "0111111111111111111110"
  1666. "0100000000000000000010"
  1667. "0111111111111111111110"
  1668. "0001000100010001100001"
  1669. "1011100001010010100111"
  1670. "1100001100111101100000"
  1671. "0110111110101000100011"
  1672. "1100011011101100100101"
  1673. "0110100100001000101101"
  1674. "0010111010100110111000"
  1675. },
  1676. /* 54*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>a", -1, 0, 16, 18, 1, "2 EDI triplets + ASCII singlet, EDI mode + final ASCII",
  1677. "111011000000100000"
  1678. "111010000010110000"
  1679. "001010111101101000"
  1680. "101110111100100001"
  1681. "100010100010011001"
  1682. "000010000000100000"
  1683. "111111111111111111"
  1684. "000000000000000000"
  1685. "011111111111111110"
  1686. "010000000000000010"
  1687. "011111111111111110"
  1688. "000100011000101111"
  1689. "101001011011101001"
  1690. "111010111100101011"
  1691. "100111010011100101"
  1692. "011111111010110101"
  1693. },
  1694. /* 55*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>\015*>\015*>a", -1, 0, 16, 18, 1, "4 EDI triplets + ASCII singlet, EDI mode + final ASCII",
  1695. "111011000000100000"
  1696. "111010000010110000"
  1697. "001010000000100000"
  1698. "101110000010110000"
  1699. "001010011010001000"
  1700. "000010000000100000"
  1701. "111111111111111111"
  1702. "000000000000000000"
  1703. "011111111111111110"
  1704. "010000000000000010"
  1705. "011111111111111110"
  1706. "101100100011100101"
  1707. "010111100000100111"
  1708. "011011111111100010"
  1709. "001110101010100111"
  1710. "110100010001110011"
  1711. },
  1712. /* 56*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>\015*>\015*>\015a", -1, 0, 22, 22, 1, "4 EDI triplets + singlet + ASCII, EDI mode + final 2 ASCII",
  1713. "1110110000001000000010"
  1714. "1110100000101100001011"
  1715. "0000100010000000101111"
  1716. "0000101011000010111111"
  1717. "0000100110100010001000"
  1718. "1110100010000100010001"
  1719. "1000101000100010000110"
  1720. "0000100000000000100000"
  1721. "1111111111111111111111"
  1722. "0000000000000000000000"
  1723. "0111111111111111111110"
  1724. "0100000000000000000010"
  1725. "0111111111111111111110"
  1726. "0100000000000000000010"
  1727. "0111111111111111111110"
  1728. "0001000100010001101001"
  1729. "1100100011001011100000"
  1730. "0000100110101010101011"
  1731. "0011101011110100100111"
  1732. "1001111010011000100000"
  1733. "0001110010110111101110"
  1734. "1001011011101101111101"
  1735. },
  1736. /* 57*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>\015*>\015*a", -1, 0, 22, 22, 1, "3 EDI triplets + doublet + ASCII, EDI mode + final 3 ASCII",
  1737. "1110110000001000000010"
  1738. "1110100000101100001011"
  1739. "0000100010111100000010"
  1740. "0000101011111111101011"
  1741. "0110101000100010001000"
  1742. "0010100001000100010001"
  1743. "1000101000100010000110"
  1744. "0000100000000000100000"
  1745. "1111111111111111111111"
  1746. "0000000000000000000000"
  1747. "0111111111111111111110"
  1748. "0100000000000000000010"
  1749. "0111111111111111111110"
  1750. "0100000000000000000010"
  1751. "0111111111111111111110"
  1752. "0001000100010001101101"
  1753. "1111101100010011101010"
  1754. "1101101001000001101110"
  1755. "0110100011111011101000"
  1756. "1100011001100110101011"
  1757. "1011110100111010100000"
  1758. "0001111010001000110010"
  1759. },
  1760. /* 58*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>\015*>ABC", -1, 0, 16, 18, 1, "3 EDI triplets + 3 alphas (EDI)",
  1761. "111011000000100000"
  1762. "111010000010110000"
  1763. "001010000000100101"
  1764. "101110000010111001"
  1765. "111010111100100000"
  1766. "000010000000100000"
  1767. "111111111111111111"
  1768. "000000000000000000"
  1769. "011111111111111110"
  1770. "010000000000000010"
  1771. "011111111111111110"
  1772. "100111111111100110"
  1773. "111001010000100011"
  1774. "011001101110101101"
  1775. "010011011100100111"
  1776. "000001001101111001"
  1777. },
  1778. /* 59*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>\015*>1234567", -1, 0, 22, 22, 1, "3 EDI triplets + 7 digits ending (EDI)",
  1779. "1110110000001000000010"
  1780. "1110100000101100001011"
  1781. "0000100010001000110011"
  1782. "0000101011000010000011"
  1783. "0111101111001110001000"
  1784. "0011101111100000010001"
  1785. "1000101000100010000000"
  1786. "0000100000000000100000"
  1787. "1111111111111111111111"
  1788. "0000000000000000000000"
  1789. "0111111111111111111110"
  1790. "0100000000000000000010"
  1791. "0111111111111111111110"
  1792. "0100000000000000000010"
  1793. "0111111111111111111110"
  1794. "0001000100010001100101"
  1795. "1011111111111010100100"
  1796. "1000111100110000100110"
  1797. "0010100010010111101000"
  1798. "0101100111000110101001"
  1799. "0110011101010010101010"
  1800. "0101111011000100110001"
  1801. },
  1802. /* 60*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>\015*>12345678", -1, 0, 22, 22, 1, "3 EDI triplets + 8 digits ending -> DECIMAL",
  1803. "1110110000001000000010"
  1804. "1110100000101100001011"
  1805. "0000100010111110001010"
  1806. "0000101011111111100100"
  1807. "1011101101100010001000"
  1808. "1010100000000100010001"
  1809. "1000101000100010001110"
  1810. "0000100000000000100000"
  1811. "1111111111111111111111"
  1812. "0000000000000000000000"
  1813. "0111111111111111111110"
  1814. "0100000000000000000010"
  1815. "0111111111111111111110"
  1816. "0100000000000000000010"
  1817. "0111111111111111111110"
  1818. "0001000100010001101101"
  1819. "1101011110111101100011"
  1820. "1100101101000111100010"
  1821. "1000010100101111100101"
  1822. "0110001001101100100110"
  1823. "1101100100110011101111"
  1824. "1001110001001011110010"
  1825. },
  1826. /* 61*/ { -1, -1, -1, { 0, 0, "" }, "\015*>\015*>\015*>123456789012\015*>", -1, 0, 22, 22, 1, "3 EDI triplets + 12 DECIMAL not ending -> DECIMAL",
  1827. "1110110000001000000010"
  1828. "1110100000101100001011"
  1829. "0000100010111110001010"
  1830. "0000101011111111100100"
  1831. "1011101101110110000000"
  1832. "1010100000110011101110"
  1833. "0010100011100010001010"
  1834. "0000100000000000100000"
  1835. "1111111111111111111111"
  1836. "0000000000000000000000"
  1837. "0111111111111111111110"
  1838. "0100000000000000000010"
  1839. "0111111111111111111110"
  1840. "0100000000000000000010"
  1841. "0111111111111111111110"
  1842. "1011111100010001100011"
  1843. "0111101001010000100101"
  1844. "0010110110010110101010"
  1845. "1100111001111011100010"
  1846. "1000011000100100101001"
  1847. "1110010110011011100001"
  1848. "1100100100000011111100"
  1849. },
  1850. /* 62*/ { -1, -1, -1, { 0, 0, "" }, "123456789012345", -1, 0, 16, 18, 1, "5 DECIMAL triplets, ASCII switch before padding (2)",
  1851. "111111111111001100"
  1852. "000110000110010101"
  1853. "100010110101101111"
  1854. "000010010110111111"
  1855. "100010100011110010"
  1856. "000010000000100000"
  1857. "111111111111111111"
  1858. "000000000000000000"
  1859. "011111111111111110"
  1860. "010000000000000010"
  1861. "011111111111111110"
  1862. "000100010011100010"
  1863. "101100110010100101"
  1864. "111000001001100010"
  1865. "100010110110101011"
  1866. "111111011010110001"
  1867. },
  1868. /* 63*/ { -1, -1, -1, { 0, 0, "" }, "1234567890123456", -1, 0, 16, 18, 1, "5 DECIMAL triplets + singlet, switch to ASCII before padding (2)",
  1869. "111111111111001100"
  1870. "000110000110010101"
  1871. "100010110101101111"
  1872. "000010010110110111"
  1873. "100010100010100110"
  1874. "000010000000100000"
  1875. "111111111111111111"
  1876. "000000000000000000"
  1877. "011111111111111110"
  1878. "010000000000000010"
  1879. "011111111111111110"
  1880. "000100011110100000"
  1881. "111011001101101000"
  1882. "101011010111101100"
  1883. "000101110010100011"
  1884. "010101000001110111"
  1885. },
  1886. /* 64*/ { -1, -1, -1, { 0, 0, "" }, "12345678901234567", -1, 0, 16, 18, 1, "5 DECIMAL triplets + doublet, switch before ASCII encoding of final char, padding (1)",
  1887. "111111111111001100"
  1888. "000110000110010101"
  1889. "100010110101101111"
  1890. "000010010110110111"
  1891. "001110100011101001"
  1892. "000010000000100000"
  1893. "111111111111111111"
  1894. "000000000000000000"
  1895. "011111111111111110"
  1896. "010000000000000010"
  1897. "011111111111111110"
  1898. "100000010101101011"
  1899. "101101010000100010"
  1900. "011011100001101000"
  1901. "011100000111101100"
  1902. "100010110100110100"
  1903. },
  1904. /* 65*/ { -1, -1, -1, { 0, 0, "" }, "123456789012345678", -1, 0, 16, 18, 1, "6 DECIMAL triplets, switch to ASCII, padding (1)",
  1905. "111111111111001100"
  1906. "000110000110010101"
  1907. "100010110101101010"
  1908. "000010010110100111"
  1909. "111110100000101101"
  1910. "000010000000100000"
  1911. "111111111111111111"
  1912. "000000000000000000"
  1913. "011111111111111110"
  1914. "010000000000000010"
  1915. "011111111111111110"
  1916. "110100010010100001"
  1917. "010011110101101011"
  1918. "100010000011100100"
  1919. "101110000010100101"
  1920. "011010011110111101"
  1921. },
  1922. /* 66*/ { -1, -1, -1, { 0, 0, "" }, "1234567890123456789", -1, 0, 16, 18, 1, "6 DECIMAL triplets + singlet, switch before ASCII encoding of singlet, no padding",
  1923. "111111111111001100"
  1924. "000110000110010101"
  1925. "100010110101101010"
  1926. "000010010110100111"
  1927. "111110001111000011"
  1928. "000010000000100000"
  1929. "111111111111111111"
  1930. "000000000000000000"
  1931. "011111111111111110"
  1932. "010000000000000010"
  1933. "011111111111111110"
  1934. "110110100111101001"
  1935. "000001010011100011"
  1936. "101011011101101100"
  1937. "011001101011100100"
  1938. "101110111011110000"
  1939. },
  1940. /* 67*/ { -1, -1, -1, { 0, 0, "" }, "12345678901234567890", -1, 0, 16, 18, 1, "6 DECIMAL triplets + doublet, switch before ASCII 2-digit encoding of doublet, no padding",
  1941. "111111111111001100"
  1942. "000110000110010101"
  1943. "100010110101101010"
  1944. "000010010110100111"
  1945. "111110110110000111"
  1946. "000010000000100000"
  1947. "111111111111111111"
  1948. "000000000000000000"
  1949. "011111111111111110"
  1950. "010000000000000010"
  1951. "011111111111111110"
  1952. "110111000010100101"
  1953. "110000010000100111"
  1954. "011110101001100011"
  1955. "111110100110101101"
  1956. "001000111011111111"
  1957. },
  1958. /* 68*/ { -1, -1, -1, { 0, 0, "" }, "123456789012345678901", -1, 0, 16, 18, 1, "7 DECIMAL triplets, fills to final codeword, no padding",
  1959. "111111111111001100"
  1960. "000110000110010101"
  1961. "100010110101101010"
  1962. "000010010110100111"
  1963. "111010101111000101"
  1964. "000010000000100000"
  1965. "111111111111111111"
  1966. "000000000000000000"
  1967. "011111111111111110"
  1968. "010000000000000010"
  1969. "011111111111111110"
  1970. "000111011011101100"
  1971. "000000000110101110"
  1972. "001011010101101011"
  1973. "111000110101100101"
  1974. "110001100000110100"
  1975. },
  1976. /* 69*/ { -1, -1, -1, { 0, 0, "" }, "1234567890123456789012", -1, 0, 16, 18, 1, "7 DECIMAL triplets + singlet, fills to final codeword, no padding",
  1977. "111111111111001100"
  1978. "000110000110010101"
  1979. "100010110101101010"
  1980. "000010010110100111"
  1981. "111010100010101100"
  1982. "000010000000100000"
  1983. "111111111111111111"
  1984. "000000000000000000"
  1985. "011111111111111110"
  1986. "010000000000000010"
  1987. "011111111111111110"
  1988. "000111011001101110"
  1989. "010110011110101111"
  1990. "101000010001101000"
  1991. "100111000001100000"
  1992. "101000001010111101"
  1993. },
  1994. /* 70*/ { -1, -1, -1, { 0, 0, "" }, "123456789012345678901234567890123678901AB", -1, 0, 28, 32, 1, "DECIMAL + 4 bits ASCII switch",
  1995. "11111111111100110010001101110110"
  1996. "00011000011001010100000101101010"
  1997. "10101011101000101111100111100001"
  1998. "01111000011110100000111011101111"
  1999. "00101001110001111101000100101000"
  2000. "10101011101011111100100011100001"
  2001. "10001010001000100010001000101000"
  2002. "00011000010001000100010001100001"
  2003. "10001010001000100010001000101000"
  2004. "00011000010001000100010001100001"
  2005. "00001000000000000000000000100000"
  2006. "11111111111111111111111111111111"
  2007. "00000000000000000000000000100000"
  2008. "11111111111111111111111111111111"
  2009. "00000000000000000000000000000000"
  2010. "01111111111111111111111111111110"
  2011. "01000000000000000000000000000010"
  2012. "01111111111111111111111111111110"
  2013. "10001010001000100010001000101000"
  2014. "00011000010001000100010001100001"
  2015. "10001010000110111001100000101011"
  2016. "00011000011011000011101111101001"
  2017. "11111001011001010000010011100010"
  2018. "10111001000000011101101001100000"
  2019. "10111010100111101101110011101010"
  2020. "10011010100110001011101000100101"
  2021. "11011010001110110010110100101110"
  2022. "01011111010001011011010000110111"
  2023. },
  2024. /* 71*/ { -1, -1, -1, { 0, 0, "" }, "123456789012345678901234567890123678901234A", -1, 0, 22, 22, 0, "DECIMAL + single ASCII in last 8 bits; BWIPP different encodation TODO: investigate",
  2025. "1111111111110011001000"
  2026. "0001100001100101010000"
  2027. "1101100110101011101000"
  2028. "0101101010011100011110"
  2029. "1011101110011100010010"
  2030. "1000100011101111111010"
  2031. "0111100001111001000001"
  2032. "0000100000000000100000"
  2033. "1111111111111111111111"
  2034. "0000000000000000000000"
  2035. "0111111111111111111110"
  2036. "0100000000000000000010"
  2037. "0111111111111111111110"
  2038. "0100000000000000000010"
  2039. "0111111111111111111110"
  2040. "1110100010110010101000"
  2041. "0110010011100000100000"
  2042. "0100100111101100101110"
  2043. "1010101110111110101001"
  2044. "1001001001100100101101"
  2045. "1111110100001111101111"
  2046. "0100010100010000111100"
  2047. },
  2048. /* 72*/ { -1, -1, 10, { 0, 0, "" }, "123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", -1, 0, 16, 49, 1, "T-48 90",
  2049. "1111111111001100100011011011010101110100010111110"
  2050. "0001000110010101000001010101001110001111010000011"
  2051. "0111000100011001010100000010110100111000111101000"
  2052. "1011111111001100100011010011010101110100010111110"
  2053. "0011101111111100110010000110101101010111010001011"
  2054. "0111000100011001010100000010110100111000111101000"
  2055. "1110011111101101100001000001001100101010010111010"
  2056. "0011101111100111100011110011101001101100010110101"
  2057. "0011110011111001001110110011010010001001010011011"
  2058. "1000100101011101110111000000111110000010001000010"
  2059. "0000000000000000000000001000000000000000000000000"
  2060. "1111111111111111111111111111111111111111111111111"
  2061. "1000000000000000000000001000000000000000000000001"
  2062. "1011111111111111111111111111111111111111111111101"
  2063. "1000000000000000000000001000000000000000000000001"
  2064. "1011111111111111111111111111111111111111111111101"
  2065. },
  2066. /* 73*/ { -1, -1, 10, { 0, 0, "" }, "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789", -1, ZINT_ERROR_TOO_LONG, 0, 0, 1, "T-48 89",
  2067. ""
  2068. },
  2069. /* 74*/ { -1, -1, -1, { 0, 0, "" }, "A123456789012345678901A", -1, 0, 22, 22, 1, "ASCII + 7 DECIMAL triplets + ASCII",
  2070. "0100111111111111001100"
  2071. "0010100001000110010101"
  2072. "1000101101011010101110"
  2073. "0000100101101001110001"
  2074. "1011100100100010001000"
  2075. "1111100010000100010001"
  2076. "1000101000100010001000"
  2077. "0000100000000000100000"
  2078. "1111111111111111111111"
  2079. "0000000000000000000000"
  2080. "0111111111111111111110"
  2081. "0100000000000000000010"
  2082. "0111111111111111111110"
  2083. "0100000000000000000010"
  2084. "0111111111111111111110"
  2085. "0001000100010001101110"
  2086. "0110110011111100100001"
  2087. "0100111101011000101001"
  2088. "1110011001111101100000"
  2089. "0100010001010001101011"
  2090. "1010001010001011101101"
  2091. "1101101001100001110101"
  2092. },
  2093. /* 75*/ { -1, -1, -1, { 0, 0, "" }, "A1234567890123456789012A", -1, 0, 22, 22, 1, "ASCII + 7 DECIMAL triplets + singlet + ASCII",
  2094. "0100111111111111001100"
  2095. "0010100001000110010101"
  2096. "1000101101011010101110"
  2097. "0000100101101001110001"
  2098. "1011100011010010001000"
  2099. "1111100011001000010001"
  2100. "1000101000100010000000"
  2101. "0000100000000000100000"
  2102. "1111111111111111111111"
  2103. "0000000000000000000000"
  2104. "0111111111111111111110"
  2105. "0100000000000000000010"
  2106. "0111111111111111111110"
  2107. "0100000000000000000010"
  2108. "0111111111111111111110"
  2109. "0001000100010001101000"
  2110. "1011001000110010100111"
  2111. "0001000000011010100011"
  2112. "0100110111001011100110"
  2113. "0100110111111110101111"
  2114. "0101101010001000100111"
  2115. "1110011111011111110100"
  2116. },
  2117. /* 76*/ { -1, -1, -1, { 0, 0, "" }, "A12345678901234567890123A", -1, 0, 22, 22, 1, "ASCII + 7 DECIMAL triplets + doublet + ASCII",
  2118. "0100111111111111001100"
  2119. "0010100001000110010101"
  2120. "1000101101011010101110"
  2121. "0000100101101001110001"
  2122. "1011101001010010001000"
  2123. "1111101001001000010001"
  2124. "1000101000100010001110"
  2125. "0000100000000000100000"
  2126. "1111111111111111111111"
  2127. "0000000000000000000000"
  2128. "0111111111111111111110"
  2129. "0100000000000000000010"
  2130. "0111111111111111111110"
  2131. "0100000000000000000010"
  2132. "0111111111111111111110"
  2133. "0001000100010001101011"
  2134. "0100111101100011100011"
  2135. "1011010001011001101100"
  2136. "0110100100111100100101"
  2137. "0000100001000101101101"
  2138. "0001111010010111100010"
  2139. "0001001001000000110100"
  2140. },
  2141. /* 77*/ { -1, -1, -1, { 0, 0, "" }, "ABCDEFGHI123456789012A", -1, 0, 22, 22, 1, "3 C40 triplets + 4 DECIMAL triplets + ASCII 0 padding",
  2142. "1110110101111001100010"
  2143. "0110101001100111010100"
  2144. "1000100101111110001010"
  2145. "0000101111111111100100"
  2146. "1011101101110110000100"
  2147. "1010100000110011100010"
  2148. "1000101000100010001001"
  2149. "0000100000000000100000"
  2150. "1111111111111111111111"
  2151. "0000000000000000000000"
  2152. "0111111111111111111110"
  2153. "0100000000000000000010"
  2154. "0111111111111111111110"
  2155. "0100000000000000000010"
  2156. "0111111111111111111110"
  2157. "0001000100010001101001"
  2158. "1011001000111110100100"
  2159. "0010110001001001101100"
  2160. "0101101100110101100011"
  2161. "1011000110000101101111"
  2162. "0011001101000011100011"
  2163. "0100110101010110111011"
  2164. },
  2165. /* 78*/ { -1, -1, -1, { 0, 0, "" }, "ABCDEFGHI12345678", -1, 0, 22, 22, 1, "3 C40 triplets + ASCII 2-digits end-of-data",
  2166. "1110110101111001100010"
  2167. "0110101001100111010100"
  2168. "1000100101111110001010"
  2169. "0000101111111111100100"
  2170. "1011101101100010001000"
  2171. "1010100000000100010001"
  2172. "1000101000100010001011"
  2173. "0000100000000000100000"
  2174. "1111111111111111111111"
  2175. "0000000000000000000000"
  2176. "0111111111111111111110"
  2177. "0100000000000000000010"
  2178. "0111111111111111111110"
  2179. "0100000000000000000010"
  2180. "0111111111111111111110"
  2181. "0001000100010001101011"
  2182. "1100001011100110100001"
  2183. "0001001101101111100011"
  2184. "1101011100100001100101"
  2185. "0001011111001001100101"
  2186. "1010111111111110101011"
  2187. "1101101100101010110101"
  2188. },
  2189. /* 79*/ { -1, -1, -1, { 0, 0, "" }, "ABCDEFGH123456789012345678901A", -1, 0, 22, 22, 1, "2 C40 triplets + doublet + ASCII 2-digits ASCII 0 padding",
  2190. "1110110101111001100010"
  2191. "0110101001100111010100"
  2192. "1000100100111110011010"
  2193. "0000101110111110011111"
  2194. "1100101101100010011010"
  2195. "0101101011001110011111"
  2196. "1100101101100001001011"
  2197. "0000100000000000100000"
  2198. "1111111111111111111111"
  2199. "0000000000000000000000"
  2200. "0111111111111111111110"
  2201. "0100000000000000000010"
  2202. "0111111111111111111110"
  2203. "0100000000000000000010"
  2204. "0111111111111111111110"
  2205. "0101101100110010100111"
  2206. "0101100110010101101001"
  2207. "1011110110000101100001"
  2208. "1001100010001101100000"
  2209. "1001001001000101100000"
  2210. "0010110111111111101111"
  2211. "1010010000100000110111"
  2212. },
  2213. /* 80*/ { -1, -1, -1, { 0, 0, "" }, "\101\102\103\104\105\106\107\110\111\112\113\200", -1, 0, 22, 22, 1, "3 C40 triplets + doublet + extended ASCII - note extended ASCII not encodable in C40 mode",
  2214. "1110110101111001100010"
  2215. "0110101001100111010100"
  2216. "1000100101100110001011"
  2217. "0000101111001100101011"
  2218. "1000101111100010001000"
  2219. "0001101111000100010001"
  2220. "1000101000100010000001"
  2221. "0000100000000000100000"
  2222. "1111111111111111111111"
  2223. "0000000000000000000000"
  2224. "0111111111111111111110"
  2225. "0100000000000000000010"
  2226. "0111111111111111111110"
  2227. "0100000000000000000010"
  2228. "0111111111111111111110"
  2229. "0001000100010001101001"
  2230. "1001001101110100100010"
  2231. "1111100010000001101100"
  2232. "0000001011000000100010"
  2233. "0010111110100000100000"
  2234. "1010000101100100100110"
  2235. "0101111100110010110010"
  2236. },
  2237. /* 81*/ { -1, -1, -1, { 0, 0, "" }, "\200\200", -1, 0, 16, 18, 1, "BYTE",
  2238. "111011000010001000"
  2239. "011110001000000000"
  2240. "100010100010001000"
  2241. "000110000100010001"
  2242. "100010100000110111"
  2243. "000010000000100000"
  2244. "111111111111111111"
  2245. "000000000000000000"
  2246. "011111111111111110"
  2247. "010000000000000010"
  2248. "011111111111111110"
  2249. "000100011100101011"
  2250. "001001101101100111"
  2251. "001011110000101001"
  2252. "010011001011100111"
  2253. "110100011101110111"
  2254. },
  2255. /* 82*/ { -1, -1, -1, { 0, 0, "" }, "\200\200\200\200\200\200\200\200", -1, 0, 16, 18, 1, "BYTE (no padding, byte count 0)",
  2256. "111011000010001000"
  2257. "011110000000000000"
  2258. "100010100010001000"
  2259. "000010000000000000"
  2260. "100010100010101110"
  2261. "000010000000100000"
  2262. "111111111111111111"
  2263. "000000000000000000"
  2264. "011111111111111110"
  2265. "010000000000000010"
  2266. "011111111111111110"
  2267. "000000001111100111"
  2268. "110101101010101101"
  2269. "000011001111100001"
  2270. "111101011011100111"
  2271. "101110100100111000"
  2272. },
  2273. /* 83*/ { -1, -1, -1, { 0, 0, "" }, "\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\061\062\063\064\065\066\067\070\071\060\061\062\063", -1, 0, 70, 76, 1, "249 BYTEs + 13 DECIMAL",
  2274. "1110111111100010001000100011100010001000100010001110001000100010001000111000"
  2275. "0111101001000000000000000010000000000000000000001000000000000000000000100000"
  2276. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2277. "0000100000000000000000000010000000000000000000001000000000000000000000100000"
  2278. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2279. "0000100000000000000000000010000000000000000000001000000000000000000000100000"
  2280. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2281. "0000100000000000000000000010000000000000000000001000000000000000000000100000"
  2282. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2283. "0000100000000000000000000010000000000000000000001000000000000000000000100000"
  2284. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2285. "0000100000000000000000000010000000000000000000001000000000000000000000100000"
  2286. "1000111000100010001000100011100010001000100010001110001000100010001000111000"
  2287. "0000100000000000000000000010000000000000000000001000000000000000000000100000"
  2288. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2289. "0000100000000000000000000010000000000000000000001000000000000000000000100000"
  2290. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2291. "0000100000000000000000000010000000000000000000001000000000000000000000100000"
  2292. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2293. "0000100000000000000000000010000000000000000000001000000000000000000000100000"
  2294. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2295. "0000100000000000000000000010000000000000000000001000000000000000000000100000"
  2296. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2297. "0000100000000000000000000010000000000000000000001000000000000000000000100000"
  2298. "1000111000100010001000100011100010001000100010001110001000100010001000111000"
  2299. "0000100000000000000000000010000000000000000000001000000000000000000000100000"
  2300. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2301. "0000100000000000000000000010000000000000000000001000000000000000000000100000"
  2302. "1000101000100010001000100010100010001000100010001010001000111111111100101100"
  2303. "0000100000000000000000000010000000000000000000001000000000000100011001100101"
  2304. "0000100000000000000000000010000000000000000000001000000000000000000000100000"
  2305. "1111111111111111111111111111111111111111111111111111111111111111111111111111"
  2306. "0000000000000000000000000010000000000000000000000000000000000000000000100000"
  2307. "1111111111111111111111111111111111111111111111111111111111111111111111111111"
  2308. "0000000000000000000000000010000000000000000000000000000000000000000000100000"
  2309. "1111111111111111111111111111111111111111111111111111111111111111111111111111"
  2310. "0000000000000000000000000000000000000000000000000000000000000000000000000000"
  2311. "0111111111111111111111111111111111111111111111111111111111111111111111111110"
  2312. "0100000000000000000000000000000000000000000000000000000000000000000000000010"
  2313. "0111111111111111111111111111111111111111111111111111111111111111111111111110"
  2314. "1000101101110110001000100010100010001000100010001010001000100010001000101000"
  2315. "0000101111000100010001000110000100010001000100011000010001000100010001100001"
  2316. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2317. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  2318. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2319. "0001110001000100010001000111000100010001000100011100010001000100010001110001"
  2320. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2321. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  2322. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2323. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  2324. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2325. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  2326. "1000101000100010001000100010100010001000100010001010001000000000000111100011"
  2327. "0001100001000100010001000110000100010001000100011000010001011011011110101011"
  2328. "1101100000111100100110000110000010011011010011001000110100111100000010100110"
  2329. "0000100100111111111001000010100000111100001101011011101011111101001111100110"
  2330. "0110101100100110110000111110010000101000110001101011010101000100010010100001"
  2331. "0101111010111101111000110011000001000111111011101100011100011010010111111110"
  2332. "0100101011011100111101100010011101110101001000101000100100000100010010100100"
  2333. "0100100011111101111101011110001101010001100011011010001011000000011100100100"
  2334. "1110101000101010001110101010010011000001011000001001011001011101010011100101"
  2335. "1010101111110111000110011010110101010001111000101010011010100101100100101011"
  2336. "1101100111010011110000010010000001101111110111011011101001010001101101100100"
  2337. "0011101010101010101100111010110100101000011000001001011000100111011011100001"
  2338. "0000100001100100110111010110110010110100000100011000100101111111110101100001"
  2339. "1110100010111001100110000110101110000101001110111001010100011110111110100110"
  2340. "0110100010111000001101100010011011101101111010111011010100111000101010101101"
  2341. "0010100011101011110111110110111001101001100101011000110001000000111100101011"
  2342. "0000101101010101000011010110011110110100100111111011100001010010000111100100"
  2343. "1101111110001011101100010011101010100111101110111101101000010100111000111001"
  2344. },
  2345. /* 84*/ { -1, -1, -1, { 0, 0, "" }, "\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\061\062\063\064\065\066\067\070\071\060\061\062\063", -1, 0, 70, 76, 1, "250 BYTEs + 13 DECIMAL",
  2346. "1110111111000010001000100011100010001000100010001110001000100010001000111000"
  2347. "0111101010000000000000000010000000000000000000001000000000000000000000100000"
  2348. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2349. "0000100000000000000000000010000000000000000000001000000000000000000000100000"
  2350. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2351. "0000100000000000000000000010000000000000000000001000000000000000000000100000"
  2352. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2353. "0000100000000000000000000010000000000000000000001000000000000000000000100000"
  2354. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2355. "0000100000000000000000000010000000000000000000001000000000000000000000100000"
  2356. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2357. "0000100000000000000000000010000000000000000000001000000000000000000000100000"
  2358. "1000111000100010001000100011100010001000100010001110001000100010001000111000"
  2359. "0000100000000000000000000010000000000000000000001000000000000000000000100000"
  2360. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2361. "0000100000000000000000000010000000000000000000001000000000000000000000100000"
  2362. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2363. "0000100000000000000000000010000000000000000000001000000000000000000000100000"
  2364. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2365. "0000100000000000000000000010000000000000000000001000000000000000000000100000"
  2366. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2367. "0000100000000000000000000010000000000000000000001000000000000000000000100000"
  2368. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2369. "0000100000000000000000000010000000000000000000001000000000000000000000100000"
  2370. "1000111000100010001000100011100010001000100010001110001000100010001000111000"
  2371. "0000100000000000000000000010000000000000000000001000000000000000000000100000"
  2372. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2373. "0000100000000000000000000010000000000000000000001000000000000000000000100000"
  2374. "1000101000100010001000100010100010001000100010001010001000100010001111101111"
  2375. "0000100000000000000000000010000000000000000000001000000000000000000001100001"
  2376. "0000100000000000000000000010000000000000000000001000000000000000000000100000"
  2377. "1111111111111111111111111111111111111111111111111111111111111111111111111111"
  2378. "0000000000000000000000000010000000000000000000000000000000000000000000100000"
  2379. "1111111111111111111111111111111111111111111111111111111111111111111111111111"
  2380. "0000000000000000000000000010000000000000000000000000000000000000000000100000"
  2381. "1111111111111111111111111111111111111111111111111111111111111111111111111111"
  2382. "0000000000000000000000000000000000000000000000000000000000000000000000000000"
  2383. "0111111111111111111111111111111111111111111111111111111111111111111111111110"
  2384. "0100000000000000000000000000000000000000000000000000000000000000000000000010"
  2385. "0111111111111111111111111111111111111111111111111111111111111111111111111110"
  2386. "1100101100100011011101100010100010001000100010001010001000100010001000101000"
  2387. "1001100101000011110001000110000100010001000100011000010001000100010001100001"
  2388. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2389. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  2390. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2391. "0001110001000100010001000111000100010001000100011100010001000100010001110001"
  2392. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2393. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  2394. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2395. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  2396. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  2397. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  2398. "1000101000100010001000100010100010001000100010001010001000100000010101100010"
  2399. "0001100001000100010001000110000100010001000100011000010001100011101101100000"
  2400. "1010100001101111100000000010010011001010111100011000101010100011100000101000"
  2401. "0111101101100100101100101110010111011011000100011000011000100011100011100101"
  2402. "1011101000111001101101000110000010100011001011011011100001101111110110100100"
  2403. "0100111100000111001011001011110010000001000011011111001001010100111110110011"
  2404. "0110100010101111101100111110110100010111010000011000001100110111110110101010"
  2405. "1011100010111111000000000110001101000111110011011011110100010011110010101010"
  2406. "0101100001110111111101100110010101110000111111001001111110111100000101101001"
  2407. "0000100110000111111101000110010110001100010100111000010000001101001111101111"
  2408. "0011101111110000010101101110010111001100111101001010010100010011000100100011"
  2409. "0001101011000000100111010010010111001110100111101011100100110010111001101100"
  2410. "0110100000111010110101100010101100111100111110111000001101001110001111101010"
  2411. "1001101111111101101000110110000000100001011110101000110110101111101111101111"
  2412. "1111101110000111111010000110101010100000110100101000001101111101110100101000"
  2413. "1011100011101001011011001010110001001010111111111011001001101111010110100011"
  2414. "1111101101101101100101000110010011000011110001101001001011010001000001100100"
  2415. "1110110001110110001100000011110011001110000101001111000111011001010011111110"
  2416. },
  2417. /* 85*/ { -1, -1, -1, { 0, 0, "" }, "\061\062\063\064\065\066\067\070\071\060\061\062\063\064\065\066\067\070\071\060\061\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\061\062\063\064\065\066\067\070\071\060\061\062\063", -1, 0, 104, 98, 1, "21 DECIMAL + 501 BYTEs + 13 DECIMAL",
  2418. "11111111111100110010001101011110101011101011111011111100001000100010011010001000100010001011001000"
  2419. "00010010011001010100000101110010011100011111011110101100010000000000010000000000000000000010000000"
  2420. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2421. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2422. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2423. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2424. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2425. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2426. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2427. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2428. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2429. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2430. "10001011001000100010001000111000100010001000100011100010001000100010011010001000100010001011001000"
  2431. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2432. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2433. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2434. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2435. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2436. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2437. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2438. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2439. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2440. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2441. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2442. "10001011001000100010001000111000100010001000100011100010001000100010011010001000100010001011001000"
  2443. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2444. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2445. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2446. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2447. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2448. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2449. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2450. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2451. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2452. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2453. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2454. "10001011001000100010001000111000100010001000100011100010001000100010011010001000100010001011001000"
  2455. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2456. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2457. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2458. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2459. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2460. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2461. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2462. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2463. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2464. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2465. "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
  2466. "00000000000000000000000000010000000000000000000000000000000000000000010000000000000000000000000000"
  2467. "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
  2468. "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
  2469. "01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110"
  2470. "01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
  2471. "01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110"
  2472. "01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
  2473. "01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110"
  2474. "01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
  2475. "01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110"
  2476. "10001010001000100010001000110000100011111111110010110010001101110110010010001000100010001010001000"
  2477. "00000010000000000000000000010000000000010001100110010100001111000100010100010001000100010010010001"
  2478. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2479. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  2480. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2481. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  2482. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2483. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  2484. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2485. "00010011010001000100010001011001000100010001000111000100010001000100011100010001000100010011010001"
  2486. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2487. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  2488. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2489. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  2490. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2491. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  2492. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2493. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  2494. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2495. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  2496. "10001010001000100010001000010101111100110001001110010100000010101111110110000111111110100110000011"
  2497. "00010011010001000100010001011010001100101100001111001111110110101000111111011111000101101011001001"
  2498. "11100110110111110010111110110011111011000100101010110000100011101010110010110111100011100010101000"
  2499. "00111110111100010011100011010001010100010101100010111001111100011110010001110010011000011010000000"
  2500. "10100110000000001001011110110001001111100100111010001011111010000001110010100010010110000010011110"
  2501. "01011010111101101100001000110000111010100100010110010110101101010011110011000001110100110010100101"
  2502. "10101110101000001111001100110010001001100110000110101100100011010001010000100101111000010010000000"
  2503. "01100110000011111101000100110011010100101100001010000110111010111000010000110101011100010110001011"
  2504. "01001010011110111111000101110011000110110111001110101001110110111000110101110010101010111010000010"
  2505. "00111110101000000010010100110010001010001000000110100000101110111010010111010101011001000010100001"
  2506. "01100110010110010010111011010110101010110000110110011100010001001101110001011100000001100010100010"
  2507. "00000110110101100100101101010001110010001101100110000101111101010100010001000100101000010010011010"
  2508. "01100110011110101001000101110111001010111111111110101101111101111101010100000010000111101010100010"
  2509. "11011011001011110101010000111111110011010111110111011001011000011010011011000001011110001011011010"
  2510. "10011010111000000101101111010110110001011101110110010011101001010000010001101100100110111010111011"
  2511. "00010010111011011110110110110111011010101101110010010111111101000011110110001110011000001010111010"
  2512. "10101010110001111111010101110110000001011011011010100100100011101011110110101101111111001110100000"
  2513. "00110010111100010110011101010000101010110110100010001000110111111100110011101111111001001110000101"
  2514. "10110110011111110110101010010111111001100000100110010000101010100110010110110000010101101010010011"
  2515. "01101110011000001100101000010101111100010110000110011011011111111110010010110001010011011010010100"
  2516. "01011110010111000111001101010000010101011000110110111000000100001110010000010011100100101010110001"
  2517. "10001110110111000010110010010000011110111011000010001001110010010111110111010001100000011110001101"
  2518. "00100010101001000001101111110011101100101011010010011001100001101000110010111111010000011010000000"
  2519. "01001010000100010111101011110000010100101101011110011010010011010101010111011111111010000110100000"
  2520. "11001110100000010100001001010010000101101110100110101100011011001110010101111001100100110010001101"
  2521. "01110011001111110111010101111010111001011100001111011101001011010000011011001100100000101011000101"
  2522. },
  2523. /* 86*/ { -1, -1, -1, { 0, 0, "" }, "\061\062\063\064\065\066\067\070\071\060\061\062\063\064\065\066\067\070\071\060\061\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\061\062\063\064\065\066\067\070\071\060\061\062\063\064\065\066\067\070\071\060\061\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\200\061\062\063\064\065\066\067\070\071\060\061\062\063", -1, 0, 104, 98, 1, "21 DECIMAL + 251 BYTEs + 21 DECIMAL + 252 BYTEs 13 DECIMAL",
  2524. "11111111111100110010001101011110101011101011111011111100001000100010011010001000100010001011001000"
  2525. "00010010011001010100000101110010011100011111011110101000010000000000010000000000000000000010000000"
  2526. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2527. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2528. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2529. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2530. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2531. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2532. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2533. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2534. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2535. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2536. "10001011001000100010001000111000100010001000100011100010001000100010011010001000100010001011001000"
  2537. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2538. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2539. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2540. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2541. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2542. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2543. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2544. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2545. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2546. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2547. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2548. "11111111111100110010001101011110101011101011111011111100001000100010011010001000100010001011001000"
  2549. "00010010011001010100000101110010011100011111011110101000100000000000010000000000000000000010000000"
  2550. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2551. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2552. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2553. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2554. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2555. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2556. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2557. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2558. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2559. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2560. "10001011001000100010001000111000100010001000100011100010001000100010011010001000100010001011001000"
  2561. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2562. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2563. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2564. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2565. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2566. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2567. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2568. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2569. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2570. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2571. "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
  2572. "00000000000000000000000000010000000000000000000000000000000000000000010000000000000000000000000000"
  2573. "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
  2574. "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
  2575. "01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110"
  2576. "01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
  2577. "01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110"
  2578. "01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
  2579. "01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110"
  2580. "01000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010"
  2581. "01111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111110"
  2582. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2583. "00000010000000000000000000010000000000000000000010000000000000000000010000000000000000000010000000"
  2584. "10001110111111110011001000110101110110001000100010100010001000100010010010001000100010001010001000"
  2585. "00000010010001100101010000110111000100010001000110000100010001000100010100010001000100010010010001"
  2586. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2587. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  2588. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2589. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  2590. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2591. "00010011010001000100010001011001000100010001000111000100010001000100011100010001000100010011010001"
  2592. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2593. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  2594. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2595. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  2596. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2597. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  2598. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2599. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  2600. "10001010001000100010001000110000100010001000100010100010001000100010010010001000100010001010001000"
  2601. "00010010010001000100010001010001000100010001000110000100010001000100010100010001000100010010010001"
  2602. "10001010001000100010001000110011000010101111110110110010100010001101110000110101111001011110011111"
  2603. "00010011010001000100010001011001111110010101010111011100110101000111111101011100100000000011100110"
  2604. "11001010011011010110001001110100001001000100011010001001011101000111110101001001111100011010010010"
  2605. "10000010110001101110010110010001110111011000001110100001000101100100010000011011010000010010011000"
  2606. "00010010010011001101011100010100111100011010001010000110000111001010010111011110111100011110110101"
  2607. "00000010100100110111111101110000101101010101001110010010110010100100010010111100011011110110001100"
  2608. "11010110100100100110010110010101010000010100111110111000110001101101110101000010011101011110000010"
  2609. "01100010011111110001001000010110001001011010001110101011100010001011110111111010011100111110010000"
  2610. "00101010000111011011000010010111011110110110000010001100110010101111010111000110011110101110000001"
  2611. "10000010101000010000100101110001011111110001111110001011111110100110010011001100100110100110001110"
  2612. "01000010001011010010101110010011100101000011101110010111101000100100010100011010101110000110010001"
  2613. "10000010000001111111101110010100011111101000010010010011101111111001110010100110110010101110101111"
  2614. "00110010010111000101110010010101110111000100011010000111001110001001010100111001000000010010101001"
  2615. "10011011111110010110100101011011100111100000011111111000100101010111011100000001011100001011011101"
  2616. "00010010101111110101101101010001111000011011101010010100001000100101110110110001100111010110101111"
  2617. "10110010001011100010101000010010110000110101001010100011111010000101010101001111110000010110000010"
  2618. "10001110100001100111011011010100110000011100111110011110000010111011110101100011000001000010011101"
  2619. "00010010011011110100110100110001100111101101011110111010111000101010110011100100101001000010000011"
  2620. "00011010100000000001011100010111110011110011011010010010001000001011110000110010001000100010010001"
  2621. "00011110011101000010010010110010000001011000100010000011110010101001010111001110011110010010101100"
  2622. "00111110001100010111011110010111101000000111011010010001101111001101110010110100101010101010001110"
  2623. "01100010011111000111101001010111100100110000001110110000100001001001010101100010101001111010011001"
  2624. "01100010100000100010000100010000010111111011110010010001111110110110110100110110010001110110010101"
  2625. "01010110101110000111010001010011001111110001100110101110101100101101110111100010101111100110000101"
  2626. "01101010000000111001110100110111110011111001000110101010111111101011110001100001110101000110111101"
  2627. "01111111101011000101001010011010111100011101111011110000111111000110111010011101101111001111011011"
  2628. },
  2629. /* 87*/ { -1, 3, -1, { 0, 0, "" }, "\351", -1, 0, 16, 18, 1, "é in ISO 8859-1",
  2630. "100011010101011000"
  2631. "000110110111010010"
  2632. "100010100011100110"
  2633. "001010010110111010"
  2634. "100010100001001010"
  2635. "000010000000100000"
  2636. "111111111111111111"
  2637. "000000000000000000"
  2638. "011111111111111110"
  2639. "010000000000000010"
  2640. "011111111111111110"
  2641. "000100010000100101"
  2642. "111101010011101001"
  2643. "101011100101101010"
  2644. "001010011001100100"
  2645. "101100110110110101"
  2646. },
  2647. /* 88*/ { -1, 899, -1, { 0, 0, "" }, "\134\134\351\142\154\134\141\150\134", -1, 0, 28, 32, 1, "<bksh>ébl<bksh>ah<bksh>",
  2648. "10001101010101100010001110110101"
  2649. "00011011011101001010100101101101"
  2650. "01011001010101111001100110100110"
  2651. "11011011011101101110100011101101"
  2652. "01011001010110011001010101101000"
  2653. "11011011010010100111011101100001"
  2654. "10001010001000100010001000101000"
  2655. "00011000010001000100010001100001"
  2656. "10001010001000100010001000101000"
  2657. "00011000010001000100010001100001"
  2658. "00001000000000000000000000100000"
  2659. "11111111111111111111111111111111"
  2660. "00000000000000000000000000100000"
  2661. "11111111111111111111111111111111"
  2662. "00000000000000000000000000000000"
  2663. "01111111111111111111111111111110"
  2664. "01000000000000000000000000000010"
  2665. "01111111111111111111111111111110"
  2666. "10001010001000100010001000101000"
  2667. "00011000010001000100010001100001"
  2668. "10001010000000110100111111101001"
  2669. "00011000010100010010010100101010"
  2670. "01111000001000111111111111101111"
  2671. "01111011010110101000000101100011"
  2672. "11111010000111010011000010100010"
  2673. "10001000010111011010111000100111"
  2674. "11011011010100010100111000101011"
  2675. "11011110101110100011111110110011"
  2676. },
  2677. /* 89*/ { GS1_MODE, -1, -1, { 0, 0, "" }, "[90]12[91]1234567890123A", -1, 0, 22, 22, 1, "Step B4",
  2678. "1110111101100011101110"
  2679. "1000101100111011000100"
  2680. "0000101011111001110001"
  2681. "1110101000001110111111"
  2682. "0011100100100010001000"
  2683. "1111100010000100010001"
  2684. "1000101000100010000111"
  2685. "0000100000000000100000"
  2686. "1111111111111111111111"
  2687. "0000000000000000000000"
  2688. "0111111111111111111110"
  2689. "0100000000000000000010"
  2690. "0111111111111111111110"
  2691. "0100000000000000000010"
  2692. "0111111111111111111110"
  2693. "0001000100010001100001"
  2694. "1001100110011111101011"
  2695. "1000101110111110100010"
  2696. "0010010011111111100100"
  2697. "1110011100011111101010"
  2698. "0100001001100001101110"
  2699. "1110110100001101111001"
  2700. },
  2701. /* 90*/ { GS1_MODE, -1, -1, { 0, 0, "" }, "[90]12[91]12345", -1, 0, 16, 18, 1, "Step B5",
  2702. "111011110110001110"
  2703. "100010110011101100"
  2704. "111010000010111101"
  2705. "010010111011111001"
  2706. "100010100000001010"
  2707. "000010000000100000"
  2708. "111111111111111111"
  2709. "000000000000000000"
  2710. "011111111111111110"
  2711. "010000000000000010"
  2712. "011111111111111110"
  2713. "000100011001101110"
  2714. "101011011100101110"
  2715. "111100010101100000"
  2716. "011100010001100101"
  2717. "101000101000110110"
  2718. },
  2719. /* 91*/ { GS1_MODE, -1, -1, { 0, 0, "" }, "[10]AB[90]ABCDEFGHIJKLMNOP[91]ABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, 0, 28, 32, 1, "Step P",
  2720. "11101110000100010011101101111110"
  2721. "10001011000010001110001100100110"
  2722. "01011011100110001010000101101001"
  2723. "10011010011101010000001111100011"
  2724. "10011010101101101110000101100001"
  2725. "10101001100101010101000010100111"
  2726. "01101001010111100010001100101001"
  2727. "00001000100011110101101000101010"
  2728. "00001010100011110001111101101011"
  2729. "00111011011110000010010011100100"
  2730. "00001000000000000000000000100000"
  2731. "11111111111111111111111111111111"
  2732. "00000000000000000000000000100000"
  2733. "11111111111111111111111111111111"
  2734. "00000000000000000000000000000000"
  2735. "01111111111111111111111111111110"
  2736. "01000000000000000000000000000010"
  2737. "01111111111111111111111111111110"
  2738. "11101011101111010110001000101000"
  2739. "01101011111111101100010001100001"
  2740. "10001010000010110100001000100011"
  2741. "00011000011100110001011011100011"
  2742. "11001011010100110100000101100011"
  2743. "10111000010010101001100000100100"
  2744. "01101001000001010101110001100011"
  2745. "00011011010110111001110010100100"
  2746. "01111000010000110101101110100100"
  2747. "00011110111111111110101011110110"
  2748. },
  2749. /* 92*/ { GS1_MODE, -1, -1, { 0, 0, "" }, "[11]121212", -1, 0, 16, 18, 1, "Start FNC1 and Decimal",
  2750. "111011000100000101"
  2751. "110010110011011111"
  2752. "110010001110001000"
  2753. "100110001100010001"
  2754. "100010100001011101"
  2755. "000010000000100000"
  2756. "111111111111111111"
  2757. "000000000000000000"
  2758. "011111111111111110"
  2759. "010000000000000010"
  2760. "011111111111111110"
  2761. "000100010100101010"
  2762. "101010101001100101"
  2763. "110011110100100111"
  2764. "000111100011101101"
  2765. "100101110101111101"
  2766. },
  2767. /* 93*/ { -1, -1, 1, { 1, 15, "" }, "ABCDEFGHIJ", -1, 0, 16, 18, 1, "Structured Append (Group mode) 1st symbol, no ECI",
  2768. "000011111011100101"
  2769. "111010100101101001"
  2770. "111010011000101000"
  2771. "100110110101000000"
  2772. "010110010011010000"
  2773. "000010000000100000"
  2774. "111111111111111111"
  2775. "000000000000000000"
  2776. "011111111111111110"
  2777. "010000000000000010"
  2778. "011111111111111110"
  2779. "111110111110100100"
  2780. "000001000110100000"
  2781. "011011101111100000"
  2782. "010110110000100111"
  2783. "101110110100110101"
  2784. },
  2785. /* 94*/ { -1, -1, 1, { 2, 15, "" }, "KLMNOPQRST", -1, 0, 16, 18, 1, "Structured Append (Group mode) subsequent symbol, no ECI",
  2786. "000111111011101001"
  2787. "110110100101101010"
  2788. "000010101000111100"
  2789. "001110110111100000"
  2790. "011110010101010101"
  2791. "000010000000100000"
  2792. "111111111111111111"
  2793. "000000000000000000"
  2794. "011111111111111110"
  2795. "010000000000000010"
  2796. "011111111111111110"
  2797. "100101010000100101"
  2798. "100010011111100000"
  2799. "001110111110101011"
  2800. "010101010000100001"
  2801. "110100011010111010"
  2802. },
  2803. /* 95*/ { -1, 3, 1, { 1, 15, "" }, "AB", -1, 0, 16, 18, 1, "Structured Append (Group mode) 1st symbol, with ECI",
  2804. "100011111000000101"
  2805. "000110100111101101"
  2806. "010110100010001000"
  2807. "110110001000100101"
  2808. "010010010010101011"
  2809. "000010000000100000"
  2810. "111111111111111111"
  2811. "000000000000000000"
  2812. "011111111111111110"
  2813. "010000000000000010"
  2814. "011111111111111110"
  2815. "001000110101100110"
  2816. "110100010011101110"
  2817. "010010010011100011"
  2818. "100001000010100000"
  2819. "000110111011111101"
  2820. },
  2821. /* 96*/ { -1, 3, 1, { 2, 15, "" }, "CDEF", -1, 0, 16, 18, 1, "Structured Append (Group mode) subsequent symbol, with ECI",
  2822. "000111111001011000"
  2823. "110110100111010010"
  2824. "100010100001000100"
  2825. "001010010101000101"
  2826. "010010010000110111"
  2827. "000010000000100000"
  2828. "111111111111111111"
  2829. "000000000000000000"
  2830. "011111111111111110"
  2831. "010000000000000010"
  2832. "011111111111111110"
  2833. "011001111110101000"
  2834. "101101010111100000"
  2835. "111001110100100111"
  2836. "010010010100100110"
  2837. "000100100101110110"
  2838. },
  2839. /* 97*/ { -1, -1, 1, { 128, 128, "" }, "ABCDEFGHI", -1, 0, 16, 18, 1, "Structured Append (Extended Group mode)",
  2840. "100011100011101110"
  2841. "000010000010010110"
  2842. "010110111001100010"
  2843. "100110100111010100"
  2844. "100010010111101110"
  2845. "000010000000100000"
  2846. "111111111111111111"
  2847. "000000000000000000"
  2848. "011111111111111110"
  2849. "010000000000000010"
  2850. "011111111111111110"
  2851. "000011111001100010"
  2852. "111110000001101110"
  2853. "011011001000101010"
  2854. "000001010100101011"
  2855. "110100001010111101"
  2856. },
  2857. };
  2858. const int data_size = ARRAY_SIZE(data);
  2859. int i, length, ret;
  2860. struct zint_symbol *symbol = NULL;
  2861. char escaped[8192];
  2862. char bwipp_buf[32768];
  2863. char bwipp_msg[1024];
  2864. int do_bwipp = (debug & ZINT_DEBUG_TEST_BWIPP) && testUtilHaveGhostscript(); /* Only do BWIPP test if asked, too slow otherwise */
  2865. testStartSymbol("test_encode", &symbol);
  2866. for (i = 0; i < data_size; i++) {
  2867. if (testContinue(p_ctx, i)) continue;
  2868. symbol = ZBarcode_Create();
  2869. assert_nonnull(symbol, "Symbol not created\n");
  2870. length = testUtilSetSymbol(symbol, BARCODE_CODEONE, data[i].input_mode, data[i].eci, -1 /*option_1*/, data[i].option_2, -1, -1 /*output_options*/, data[i].data, data[i].length, debug);
  2871. if (data[i].structapp.count) {
  2872. symbol->structapp = data[i].structapp;
  2873. }
  2874. ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
  2875. assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
  2876. if (p_ctx->generate) {
  2877. printf(" /*%3d*/ { %s, %d, %d, { %d, %d, \"%s\" }, \"%s\", %d, %s, %d, %d, %d, \"%s\",\n",
  2878. i, testUtilInputModeName(data[i].input_mode), data[i].eci, data[i].option_2,
  2879. data[i].structapp.index, data[i].structapp.count, data[i].structapp.id,
  2880. testUtilEscape(data[i].data, length, escaped, sizeof(escaped)), data[i].length,
  2881. testUtilErrorName(data[i].ret), symbol->rows, symbol->width, data[i].bwipp_cmp, data[i].comment);
  2882. if (ret < ZINT_ERROR) {
  2883. testUtilModulesPrint(symbol, " ", "\n");
  2884. } else {
  2885. printf(" \"\"\n");
  2886. }
  2887. printf(" },\n");
  2888. } else {
  2889. if (ret < ZINT_ERROR) {
  2890. int width, row;
  2891. assert_equal(symbol->rows, data[i].expected_rows, "i:%d symbol->rows %d != %d (%s)\n",
  2892. i, symbol->rows, data[i].expected_rows, testUtilEscape(data[i].data, length, escaped, sizeof(escaped)));
  2893. assert_equal(symbol->width, data[i].expected_width, "i:%d symbol->width %d != %d (%s)\n",
  2894. i, symbol->width, data[i].expected_width, testUtilEscape(data[i].data, length, escaped, sizeof(escaped)));
  2895. ret = testUtilModulesCmp(symbol, data[i].expected, &width, &row);
  2896. assert_zero(ret, "i:%d testUtilModulesCmp ret %d != 0 width %d row %d (%s)\n",
  2897. i, ret, width, row, testUtilEscape(data[i].data, length, escaped, sizeof(escaped)));
  2898. if (do_bwipp && testUtilCanBwipp(i, symbol, -1, data[i].option_2, -1, debug)) {
  2899. if (!data[i].bwipp_cmp) {
  2900. if (debug & ZINT_DEBUG_TEST_PRINT) printf("i:%d %s not BWIPP compatible (%s)\n", i, testUtilBarcodeName(symbol->symbology), data[i].comment);
  2901. } else {
  2902. ret = testUtilBwipp(i, symbol, -1, data[i].option_2, -1, data[i].data, length, NULL, bwipp_buf, sizeof(bwipp_buf), NULL);
  2903. assert_zero(ret, "i:%d %s testUtilBwipp ret %d != 0\n", i, testUtilBarcodeName(symbol->symbology), ret);
  2904. ret = testUtilBwippCmp(symbol, bwipp_msg, bwipp_buf, data[i].expected);
  2905. assert_zero(ret, "i:%d %s testUtilBwippCmp %d != 0 %s\n actual: %s\nexpected: %s\n",
  2906. i, testUtilBarcodeName(symbol->symbology), ret, bwipp_msg, bwipp_buf, data[i].expected);
  2907. }
  2908. }
  2909. }
  2910. }
  2911. ZBarcode_Delete(symbol);
  2912. }
  2913. testFinish();
  2914. }
  2915. static void test_encode_segs(const testCtx *const p_ctx) {
  2916. int debug = p_ctx->debug;
  2917. struct item {
  2918. int input_mode;
  2919. int option_2;
  2920. struct zint_structapp structapp;
  2921. struct zint_seg segs[3];
  2922. int ret;
  2923. int expected_rows;
  2924. int expected_width;
  2925. int bwipp_cmp;
  2926. char *comment;
  2927. char *expected;
  2928. };
  2929. /* Figure examples AIM USS Code One (USSCO) Revision March 3, 2000 */
  2930. static const struct item data[] = {
  2931. /* 0*/ { UNICODE_MODE, -1, { 0, 0, "" }, { { TU("¶"), -1, 0 }, { TU("Ж"), -1, 7 }, { TU(""), 0, 0 } }, 0, 16, 18, 1, "Standard example",
  2932. "100011010111100011"
  2933. "000110110110110111"
  2934. "010110100010001000"
  2935. "110110001000101001"
  2936. "111010001111111011"
  2937. "000010000000100000"
  2938. "111111111111111111"
  2939. "000000000000000000"
  2940. "011111111111111110"
  2941. "010000000000000010"
  2942. "011111111111111110"
  2943. "101101111011100110"
  2944. "100001001111100110"
  2945. "010110111000101011"
  2946. "001010010011101001"
  2947. "010100101110110001"
  2948. },
  2949. /* 1*/ { UNICODE_MODE, -1, { 0, 0, "" }, { { TU("¶"), -1, 0 }, { TU("Ж"), -1, 0 }, { TU(""), 0, 0 } }, ZINT_WARN_USES_ECI, 16, 18, 1, "Standard example auto-ECI",
  2950. "100011010111100011"
  2951. "000110110110110111"
  2952. "010110100010001000"
  2953. "110110001000101001"
  2954. "111010001111111011"
  2955. "000010000000100000"
  2956. "111111111111111111"
  2957. "000000000000000000"
  2958. "011111111111111110"
  2959. "010000000000000010"
  2960. "011111111111111110"
  2961. "101101111011100110"
  2962. "100001001111100110"
  2963. "010110111000101011"
  2964. "001010010011101001"
  2965. "010100101110110001"
  2966. },
  2967. /* 2*/ { UNICODE_MODE, -1, { 0, 0, "" }, { { TU("Ж"), -1, 7 }, { TU("¶"), -1, 0 }, { TU(""), 0, 0 } }, 0, 22, 22, 1, "Standard example inverted",
  2968. "1000110101010110001000"
  2969. "0001101101110100100010"
  2970. "1000101110001101011000"
  2971. "1001101011011111010010"
  2972. "1000101000111000111000"
  2973. "0010100101101101110001"
  2974. "1000101000100010001101"
  2975. "0000100000000000100000"
  2976. "1111111111111111111111"
  2977. "0000000000000000000000"
  2978. "0111111111111111111110"
  2979. "0100000000000000000010"
  2980. "0111111111111111111110"
  2981. "0100000000000000000010"
  2982. "0111111111111111111110"
  2983. "0001000100010001101111"
  2984. "1010110111011111100100"
  2985. "1100011010110110101000"
  2986. "1111001110101001101101"
  2987. "1011101010111001100100"
  2988. "0010011101100011101011"
  2989. "0011010111000001111101"
  2990. },
  2991. /* 3*/ { UNICODE_MODE, -1, { 0, 0, "" }, { { TU("Ж"), -1, 0 }, { TU("¶"), -1, 0 }, { TU(""), 0, 0 } }, ZINT_WARN_USES_ECI, 22, 22, 1, "Standard example inverted auto-ECI",
  2992. "1000110101010110001000"
  2993. "0001101101110100100010"
  2994. "1000101110001101011000"
  2995. "1001101011011111010010"
  2996. "1000101000111000111000"
  2997. "0010100101101101110001"
  2998. "1000101000100010001101"
  2999. "0000100000000000100000"
  3000. "1111111111111111111111"
  3001. "0000000000000000000000"
  3002. "0111111111111111111110"
  3003. "0100000000000000000010"
  3004. "0111111111111111111110"
  3005. "0100000000000000000010"
  3006. "0111111111111111111110"
  3007. "0001000100010001101111"
  3008. "1010110111011111100100"
  3009. "1100011010110110101000"
  3010. "1111001110101001101101"
  3011. "1011101010111001100100"
  3012. "0010011101100011101011"
  3013. "0011010111000001111101"
  3014. },
  3015. /* 4*/ { UNICODE_MODE, -1, { 0, 0, "" }, { { TU("product:Google Pixel 4a - 128 GB of Storage - Black;price:$439.97"), -1, 3 }, { TU("品名:Google 谷歌 Pixel 4a -128 GB的存储空间-黑色;零售价:¥3149.79"), -1, 29 }, { TU("Produkt:Google Pixel 4a - 128 GB Speicher - Schwarz;Preis:444,90 €"), -1, 17 } }, 0, 70, 76, 0, "AIM ITS/04-023:2022 Annex A example; BWIPP different encodation",
  3016. "1000110101010110001000100011111010110011011010101111000111000010111011110011"
  3017. "0001101101110100100010010110111110100101111100011011101000110101010010101010"
  3018. "0111101111011010010111011010001100110000001000101000110001000100001101101011"
  3019. "0000101011011101100100110010010001001000010000001011010011100011000100100001"
  3020. "1111100000100110111110011110110100000010000011101001010001000011011100100100"
  3021. "1100101111101000110111111110010010000100110010101010101001100011100101100001"
  3022. "0111101011111100101010001110001011100101100010001010011110001111001011101100"
  3023. "0000101000111101011101101010111100111101001000101011110111101001100111100011"
  3024. "1111100011010001100110011010011001100010101111001010111110001001010110100111"
  3025. "1011101010011111111111011110110001010000100110001010001000000000001001101000"
  3026. "0110100110001000110110001010001000110011001100101001000100101111001011101110"
  3027. "0101101100000001000001000010110100010010100000001001110010010101000100100110"
  3028. "1011111010101111011011111011001010111101110010101100111100111011001101111011"
  3029. "0100100010111101011100010010110110101010100110111010110001001110101011101100"
  3030. "1101100011101010101010101110001011010101100010001010010101111011000011101101"
  3031. "1011101010001101000001001110111100011101001000101000110001111101100010101000"
  3032. "0110100000100100110011100010111100010010100001011010011100010111110100100111"
  3033. "0010101000101100001101000010101100110001111110111011000001011110101011101110"
  3034. "0010100110000010010000111110011101011000000101111001010000001000001000101000"
  3035. "0111100100110110111100101110101110111100011001011011001000010011111001101000"
  3036. "1110101100110101100110110010101011000011111110101000110010110100101110100010"
  3037. "1111100111101001000001010010011110001000111111101001011101110000011011100101"
  3038. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  3039. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  3040. "1000111000100010001000100011100010001000100010001110001000100010001000111000"
  3041. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  3042. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  3043. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  3044. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  3045. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  3046. "0000100000000000000000000010000000000000000000001000000000000000000000100000"
  3047. "1111111111111111111111111111111111111111111111111111111111111111111111111111"
  3048. "0000000000000000000000000010000000000000000000000000000000000000000000100000"
  3049. "1111111111111111111111111111111111111111111111111111111111111111111111111111"
  3050. "0000000000000000000000000010000000000000000000000000000000000000000000100000"
  3051. "1111111111111111111111111111111111111111111111111111111111111111111111111111"
  3052. "0000000000000000000000000000000000000000000000000000000000000000000000000000"
  3053. "0111111111111111111111111111111111111111111111111111111111111111111111111110"
  3054. "0100000000000000000000000000000000000000000000000000000000000000000000000010"
  3055. "0111111111111111111111111111111111111111111111111111111111111111111111111110"
  3056. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  3057. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  3058. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  3059. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  3060. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  3061. "0001110001000100010001000111000100010001000100011100010001000100010001110001"
  3062. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  3063. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  3064. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  3065. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  3066. "1000101000100010001000100010100010001000100010001010001000100010001000101000"
  3067. "0001100001000100010001000110000100010001000100011000010001000100010001100001"
  3068. "1000101000100010001000100010100010001000100010001010001000111001101111100110"
  3069. "0001100001000100010001000110000100010001000100011000010001000110100010100101"
  3070. "0101101000101000110010110110001110100100110101001000001100000010011101100010"
  3071. "0100101100111011100101111110111100100011111000111010110101000110001000100111"
  3072. "1011100010000010011110111110111011110111001100111000101011101100001101100001"
  3073. "0011111101010101000010110011010000101111001101011101101100000011001101111110"
  3074. "1001101110000000010100100110001000011000010000001001100010100101011001100000"
  3075. "1010100110110100010001001110110010011100001101001000000010100010111111100101"
  3076. "0001101110111011011001101110001100010010110101111000101011101001111000100000"
  3077. "0100100011110110101101100110010110110100101011001011011000011001000111100011"
  3078. "1010101111011001001000100110010011010011110100101010010111000101001001100110"
  3079. "1011100010101101111110010010001011100010010101111001001111010100011111100001"
  3080. "0110101001011011001101100110110001100100010000101011010010101001110100100110"
  3081. "1101101000100011101100101110100110011111100111111001010100100101111101100010"
  3082. "1100100010111011001011100010100100011110001000101011000010100011101011101111"
  3083. "1110100101000010010101100010010111010111001110011010010101111110100000100011"
  3084. "0110101011010011001101110110100011011101001011011001000100000001110011101110"
  3085. "1110110001111000110010010111100110011010101100011101011011100000011001110111"
  3086. },
  3087. /* 5*/ { UNICODE_MODE, -1, { 0, 0, "" }, { { TU("price:$439.97"), -1, 3 }, { TU("零售价:¥3149.79"), -1, 29 }, { TU("Preis:444,90 €"), -1, 17 } }, 0, 40, 42, 1, "AIM ITS/04-023:2022 Annex A example price only",
  3088. "100011010101011000101100100001110111110110"
  3089. "000110110111010010001010010100010011101010"
  3090. "011010011000110010101010001100101110100101"
  3091. "010010011010110101111001101011110011101101"
  3092. "100010100010011110001000110011101100101101"
  3093. "001010001011110111101001000100111010101011"
  3094. "101110110100111010101010101010110010101101"
  3095. "110010101110100011011000000100111111100001"
  3096. "010110100010001001011001011101100110100111"
  3097. "110110001000100011001001001101101010100100"
  3098. "001110101000110010111001001011100010101000"
  3099. "101110111001011101111000000110110101100001"
  3100. "100011100010001000101100100010001000111000"
  3101. "000110000100010001001001000100010001100001"
  3102. "100010100010001000101000100010001000101000"
  3103. "000010000000000000001000000000000000100000"
  3104. "111111111111111111111111111111111111111111"
  3105. "000000000000000000000000000000000000000000"
  3106. "011111111111111111111111111111111111111110"
  3107. "010000000000000000000000000000000000000010"
  3108. "011111111111111111111111111111111111111110"
  3109. "010000000000000000000000000000000000000010"
  3110. "011111111111111111111111111111111111111110"
  3111. "010000000000000000000000000000000000000010"
  3112. "011111111111111111111111111111111111111110"
  3113. "000110000100010001001001000100010001100001"
  3114. "100010100010001000101000100010001000101000"
  3115. "000111000100010001001101000100010001110001"
  3116. "100010100010001000101000100010001000101000"
  3117. "000110000100010001001001000100010001100001"
  3118. "100010101101011000011000010110000000101110"
  3119. "000110111010101011001011011010010011100010"
  3120. "100010000110000101101011111101110001100010"
  3121. "010110010000111010111000101011000010101010"
  3122. "111010111101001011001010101000001111100000"
  3123. "011110101101000001001001011001010000100111"
  3124. "110110011011111111111000000001111100101100"
  3125. "110110001001101110101011000011000000101111"
  3126. "100110111001001100101001010010001011100111"
  3127. "111011100100101100101111011011100100111101"
  3128. },
  3129. /* 6*/ { DATA_MODE, -1, { 0, 0, "" }, { { TU("\266"), 1, 0 }, { TU("\266"), 1, 7 }, { TU("\266"), 1, 0 } }, 0, 22, 22, 1, "Standard example + extra seg, data mode",
  3130. "1000110101111000110101"
  3131. "0001101101101101111101"
  3132. "1000101000100011100011"
  3133. "0010100010100110110111"
  3134. "0101101000100010001110"
  3135. "1101100010001001011011"
  3136. "0011101000100010000010"
  3137. "0000100000000000100000"
  3138. "1111111111111111111111"
  3139. "0000000000000000000000"
  3140. "0111111111111111111110"
  3141. "0100000000000000000010"
  3142. "0111111111111111111110"
  3143. "0100000000000000000010"
  3144. "0111111111111111111110"
  3145. "0111000100010001100011"
  3146. "1100010110011101101111"
  3147. "1100000111010111101001"
  3148. "0010000001001111101110"
  3149. "1100100101010100100110"
  3150. "1110101101100111101011"
  3151. "1001101001111010111100"
  3152. },
  3153. /* 7*/ { UNICODE_MODE, -1, { 1, 15, "" }, { { TU("A"), -1, 3 }, { TU("B"), -1, 4 }, { TU("C"), -1, 5 } }, 0, 22, 22, 1, "Structured Append (Group mode) 1st symbol, with ECI",
  3154. "1000111110000001010101"
  3155. "0001101001111011011101"
  3156. "1000101000100001000101"
  3157. "0010100010010100101101"
  3158. "1000101000100001000101"
  3159. "0010100010011000111101"
  3160. "1000101000100001000111"
  3161. "0000100000000000100000"
  3162. "1111111111111111111111"
  3163. "0000000000000000000000"
  3164. "0111111111111111111110"
  3165. "0100000000000000000010"
  3166. "0111111111111111111110"
  3167. "0100000000000000000010"
  3168. "0111111111111111111110"
  3169. "0010001001110100100100"
  3170. "0010010011001111101011"
  3171. "1101000100011110101010"
  3172. "0000000001000101101000"
  3173. "1101010110111101101011"
  3174. "0011010110111100101011"
  3175. "1111101011110000110101"
  3176. },
  3177. /* 8*/ { UNICODE_MODE, -1, { 3, 15, "" }, { { TU("A"), -1, 3 }, { TU("B"), -1, 4 }, { TU("C"), -1, 5 } }, 0, 22, 22, 1, "Structured Append (Group mode) subsequent symbol, with ECI",
  3178. "0010111110010110001000"
  3179. "1100101001110100100010"
  3180. "1000100100010110001000"
  3181. "0101100010110100100010"
  3182. "1000100100010110001000"
  3183. "0110100011110100100010"
  3184. "1000100100100010001100"
  3185. "0000100000000000100000"
  3186. "1111111111111111111111"
  3187. "0000000000000000000000"
  3188. "0111111111111111111110"
  3189. "0100000000000000000010"
  3190. "0111111111111111111110"
  3191. "0100000000000000000010"
  3192. "0111111111111111111110"
  3193. "0111010000010001101101"
  3194. "0001110000100010101101"
  3195. "0101011110011000101110"
  3196. "1111110110000110100111"
  3197. "0100001100101001100010"
  3198. "1111010111000111100011"
  3199. "0010100111110110110101"
  3200. },
  3201. /* 9*/ { UNICODE_MODE, -1, { 128, 128, "" }, { { TU("A"), -1, 3 }, { TU("B"), -1, 4 }, { TU("C"), -1, 5 } }, 0, 22, 22, 1, "Structured Append (Extended Group mode)",
  3202. "1000111000111001011000"
  3203. "0000100000100111010010"
  3204. "1000101000010001011000"
  3205. "0010100101001011010010"
  3206. "1000101000010001011000"
  3207. "0010100110001111010010"
  3208. "1000101000010010000001"
  3209. "0000100000000000100000"
  3210. "1111111111111111111111"
  3211. "0000000000000000000000"
  3212. "0111111111111111111110"
  3213. "0100000000000000000010"
  3214. "0111111111111111111110"
  3215. "0100000000000000000010"
  3216. "0111111111111111111110"
  3217. "0010011101000001101001"
  3218. "1111101010101110101001"
  3219. "0111011000100101100010"
  3220. "1111010000001010101101"
  3221. "0010001100101010101111"
  3222. "0000110101011010101000"
  3223. "0110000110100100110110"
  3224. },
  3225. /* 10*/ { UNICODE_MODE, 9, { 0, 0, "" }, { { TU("A"), -1, 3 }, { TU("B"), -1, 4 }, { TU("C"), -1, 5 } }, ZINT_ERROR_INVALID_OPTION, 0, 0, 1, "Multiple segments not suppoted for Version S",
  3226. ""
  3227. },
  3228. };
  3229. const int data_size = ARRAY_SIZE(data);
  3230. int i, j, seg_count, ret;
  3231. struct zint_symbol *symbol = NULL;
  3232. char escaped[8192];
  3233. char bwipp_buf[32768];
  3234. char bwipp_msg[1024];
  3235. int do_bwipp = (debug & ZINT_DEBUG_TEST_BWIPP) && testUtilHaveGhostscript(); /* Only do BWIPP test if asked, too slow otherwise */
  3236. testStartSymbol("test_encode_segs", &symbol);
  3237. for (i = 0; i < data_size; i++) {
  3238. if (testContinue(p_ctx, i)) continue;
  3239. symbol = ZBarcode_Create();
  3240. assert_nonnull(symbol, "Symbol not created\n");
  3241. testUtilSetSymbol(symbol, BARCODE_CODEONE, data[i].input_mode, -1 /*eci*/,
  3242. -1 /*option_1*/, data[i].option_2, -1, -1 /*output_options*/,
  3243. NULL, 0, debug);
  3244. if (data[i].structapp.count) {
  3245. symbol->structapp = data[i].structapp;
  3246. }
  3247. for (j = 0, seg_count = 0; j < 3 && data[i].segs[j].length; j++, seg_count++);
  3248. ret = ZBarcode_Encode_Segs(symbol, data[i].segs, seg_count);
  3249. assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode_Segs ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
  3250. if (p_ctx->generate) {
  3251. char escaped1[4096];
  3252. char escaped2[4096];
  3253. int length = data[i].segs[0].length == -1 ? (int) ustrlen(data[i].segs[0].source) : data[i].segs[0].length;
  3254. int length1 = data[i].segs[1].length == -1 ? (int) ustrlen(data[i].segs[1].source) : data[i].segs[1].length;
  3255. int length2 = data[i].segs[2].length == -1 ? (int) ustrlen(data[i].segs[2].source) : data[i].segs[2].length;
  3256. printf(" /*%3d*/ { %s, %d, { %d, %d, \"%s\" }, { { TU(\"%s\"), %d, %d }, { TU(\"%s\"), %d, %d }, { TU(\"%s\"), %d, %d } }, %s, %d, %d, %d, \"%s\",\n",
  3257. i, testUtilInputModeName(data[i].input_mode), data[i].option_2,
  3258. data[i].structapp.index, data[i].structapp.count, data[i].structapp.id,
  3259. testUtilEscape((const char *) data[i].segs[0].source, length, escaped, sizeof(escaped)), data[i].segs[0].length, data[i].segs[0].eci,
  3260. testUtilEscape((const char *) data[i].segs[1].source, length1, escaped1, sizeof(escaped1)), data[i].segs[1].length, data[i].segs[1].eci,
  3261. testUtilEscape((const char *) data[i].segs[2].source, length2, escaped2, sizeof(escaped2)), data[i].segs[2].length, data[i].segs[2].eci,
  3262. testUtilErrorName(data[i].ret), symbol->rows, symbol->width, data[i].bwipp_cmp, data[i].comment);
  3263. if (ret < ZINT_ERROR) {
  3264. testUtilModulesPrint(symbol, " ", "\n");
  3265. } else {
  3266. printf(" \"\"\n");
  3267. }
  3268. printf(" },\n");
  3269. } else {
  3270. if (ret < ZINT_ERROR) {
  3271. int width, row;
  3272. assert_equal(symbol->rows, data[i].expected_rows, "i:%d symbol->rows %d != %d\n",
  3273. i, symbol->rows, data[i].expected_rows);
  3274. assert_equal(symbol->width, data[i].expected_width, "i:%d symbol->width %d != %d\n",
  3275. i, symbol->width, data[i].expected_width);
  3276. ret = testUtilModulesCmp(symbol, data[i].expected, &width, &row);
  3277. assert_zero(ret, "i:%d testUtilModulesCmp ret %d != 0 width %d row %d\n",
  3278. i, ret, width, row);
  3279. if (do_bwipp && testUtilCanBwipp(i, symbol, -1, data[i].option_2, -1, debug)) {
  3280. if (!data[i].bwipp_cmp) {
  3281. if (debug & ZINT_DEBUG_TEST_PRINT) printf("i:%d %s not BWIPP compatible (%s)\n", i, testUtilBarcodeName(symbol->symbology), data[i].comment);
  3282. } else {
  3283. ret = testUtilBwippSegs(i, symbol, -1, data[i].option_2, -1, data[i].segs, seg_count, NULL, bwipp_buf, sizeof(bwipp_buf));
  3284. assert_zero(ret, "i:%d %s testUtilBwippSegs ret %d != 0\n", i, testUtilBarcodeName(symbol->symbology), ret);
  3285. ret = testUtilBwippCmp(symbol, bwipp_msg, bwipp_buf, data[i].expected);
  3286. assert_zero(ret, "i:%d %s testUtilBwippCmp %d != 0 %s\n actual: %s\nexpected: %s\n",
  3287. i, testUtilBarcodeName(symbol->symbology), ret, bwipp_msg, bwipp_buf, data[i].expected);
  3288. }
  3289. }
  3290. }
  3291. }
  3292. ZBarcode_Delete(symbol);
  3293. }
  3294. testFinish();
  3295. }
  3296. static void test_fuzz(const testCtx *const p_ctx) {
  3297. int debug = p_ctx->debug;
  3298. struct item {
  3299. int option_2;
  3300. char *data;
  3301. int length;
  3302. int ret;
  3303. int bwipp_cmp;
  3304. char *comment;
  3305. };
  3306. /* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
  3307. static const struct item data[] = {
  3308. /* 0*/ { -1, "3333P33B\035333V3333333333333\0363", -1, 0, 1, "" }, /* #181 Nico Gunkel, OSS-Fuzz */
  3309. /* 1*/ { -1, "{{-06\024755712162106130000000829203983\377", -1, 0, 1, "" }, /* #232 Jan Schrewe, CI-Fuzz, out-of-bounds in is_last_single_ascii() sp + 1 */
  3310. /* 2*/ { -1, "\000\000\000\367\000\000\000\000\000\103\040\000\000\244\137\140\140\000\000\000\000\000\000\000\000\000\005\000\000\000\000\000\165\060\060\060\060\061\060\060\114\114\060\010\102\102\102\102\102\102\102\102\057\102\100\102\057\233\100\102", 60, 0, 1, "" }, /* #300 (#4) Andre Maute (`c1_c40text_cnt()` not accounting for extended ASCII shifts) */
  3311. /* 3*/ { 10, "\153\153\153\060\001\000\134\153\153\015\015\353\362\015\015\015\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\015\015\015\015\015\015\015\015\015\015\015\015\015\015\015\362\362\000", 65, ZINT_ERROR_TOO_LONG, 1, "" }, /* #300 (#8) Andre Maute (`c1_encode()` looping on latch) */
  3312. /* 4*/ { 10, "\015\015\353\362\015\015\015\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\110\015\015\015\015\015\015\015\015\015\015\015\015\015\015\015\362\362\000", 39, 0, 1, "" }, /* #300 (#8 shortened) Andre Maute */
  3313. /* 5*/ { 10, "\153\153\153\153\153\060\001\000\000\134\153\153\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\153\153\153\153\153\153\043\000\000\307\000\147\000\000\000\043\113\153\162\162\215\220", 90, ZINT_ERROR_TOO_LONG, 1, "" }, /* #300 (#12) Andre Maute (too small buffer for Version T) */
  3314. };
  3315. const int data_size = ARRAY_SIZE(data);
  3316. int i, length, ret;
  3317. struct zint_symbol *symbol = NULL;
  3318. char bwipp_buf[32768];
  3319. char bwipp_msg[1024];
  3320. int do_bwipp = (debug & ZINT_DEBUG_TEST_BWIPP) && testUtilHaveGhostscript(); /* Only do BWIPP test if asked, too slow otherwise */
  3321. testStartSymbol("test_fuzz", &symbol);
  3322. for (i = 0; i < data_size; i++) {
  3323. if (testContinue(p_ctx, i)) continue;
  3324. symbol = ZBarcode_Create();
  3325. assert_nonnull(symbol, "Symbol not created\n");
  3326. length = testUtilSetSymbol(symbol, BARCODE_CODEONE, -1 /*input_mode*/, -1 /*eci*/, -1 /*option_1*/, data[i].option_2, -1, -1 /*output_options*/, data[i].data, data[i].length, debug);
  3327. ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
  3328. assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
  3329. if (ret < ZINT_ERROR) {
  3330. if (do_bwipp && testUtilCanBwipp(i, symbol, -1, data[i].option_2, -1, debug)) {
  3331. if (!data[i].bwipp_cmp) {
  3332. if (debug & ZINT_DEBUG_TEST_PRINT) printf("i:%d %s not BWIPP compatible (%s)\n", i, testUtilBarcodeName(symbol->symbology), data[i].comment);
  3333. } else {
  3334. char modules_dump[4096];
  3335. assert_notequal(testUtilModulesDump(symbol, modules_dump, sizeof(modules_dump)), -1, "i:%d testUtilModulesDump == -1\n", i);
  3336. ret = testUtilBwipp(i, symbol, -1, data[i].option_2, -1, data[i].data, length, NULL, bwipp_buf, sizeof(bwipp_buf), NULL);
  3337. assert_zero(ret, "i:%d %s testUtilBwipp ret %d != 0\n", i, testUtilBarcodeName(symbol->symbology), ret);
  3338. ret = testUtilBwippCmp(symbol, bwipp_msg, bwipp_buf, modules_dump);
  3339. assert_zero(ret, "i:%d %s testUtilBwippCmp %d != 0 %s\n actual: %s\nexpected: %s\n",
  3340. i, testUtilBarcodeName(symbol->symbology), ret, bwipp_msg, bwipp_buf, modules_dump);
  3341. }
  3342. }
  3343. }
  3344. ZBarcode_Delete(symbol);
  3345. }
  3346. testFinish();
  3347. }
  3348. int main(int argc, char *argv[]) {
  3349. testFunction funcs[] = { /* name, func */
  3350. { "test_large", test_large },
  3351. { "test_input", test_input },
  3352. { "test_encode", test_encode },
  3353. { "test_encode_segs", test_encode_segs },
  3354. { "test_fuzz", test_fuzz },
  3355. };
  3356. testRun(argc, argv, funcs, ARRAY_SIZE(funcs));
  3357. testReport();
  3358. return 0;
  3359. }
  3360. /* vim: set ts=4 sw=4 et : */