test_hanxin.c 266 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700
  1. /*
  2. libzint - the open source barcode library
  3. Copyright (C) 2019-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 option_1;
  33. int option_2;
  34. int option_3;
  35. char *pattern;
  36. int length;
  37. int ret;
  38. int expected_rows;
  39. int expected_width;
  40. char *expected_errtxt;
  41. };
  42. /* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
  43. static const struct item data[] = {
  44. /* 0*/ { -1, -1, -1, "1", 7827, 0, 189, 189, "" },
  45. /* 1*/ { -1, -1, -1, "1", 7828, ZINT_ERROR_TOO_LONG, -1, -1, "Error 541: Input too long, requires 3265 codewords (maximum 3264)" },
  46. /* 2*/ { -1, -1, -1, "A", 4350, 0, 189, 189, "" },
  47. /* 3*/ { -1, -1, -1, "A", 4351, ZINT_ERROR_TOO_LONG, -1, -1, "Error 541: Input too long, requires 3265 codewords (maximum 3264)" },
  48. /* 4*/ { -1, -1, -1, "\200", 3261, 0, 189, 189, "" },
  49. /* 5*/ { -1, -1, -1, "\200", 3262, ZINT_ERROR_TOO_LONG, -1, -1, "Error 541: Input too long, requires 3265 codewords (maximum 3264)" },
  50. /* 6*/ { -1, -1, ZINT_FULL_MULTIBYTE, "\241", 4348, 0, 189, 189, "" },
  51. /* 7*/ { -1, -1, ZINT_FULL_MULTIBYTE, "\241", 4350, ZINT_ERROR_TOO_LONG, -1, -1, "Error 541: Input too long, requires 3265 codewords (maximum 3264)" },
  52. /* 8*/ { -1, 1, -1, "1", 45, 0, 23, 23, "" },
  53. /* 9*/ { -1, 1, -1, "1", 46, ZINT_ERROR_TOO_LONG, -1, -1, "Error 542: Input too long for Version 1, requires 22 codewords (maximum 21)" },
  54. /* 10*/ { -1, 1, -1, "A", 26, 0, 23, 23, "" },
  55. /* 11*/ { -1, 1, -1, "A", 27, ZINT_ERROR_TOO_LONG, -1, -1, "Error 542: Input too long for Version 1, requires 22 codewords (maximum 21)" },
  56. /* 12*/ { -1, 1, -1, "\200", 18, 0, 23, 23, "" },
  57. /* 13*/ { -1, 1, -1, "\200", 19, ZINT_ERROR_TOO_LONG, -1, -1, "Error 542: Input too long for Version 1, requires 22 codewords (maximum 21)" },
  58. /* 14*/ { -1, 1, ZINT_FULL_MULTIBYTE, "\241", 24, 0, 23, 23, "" },
  59. /* 15*/ { -1, 1, ZINT_FULL_MULTIBYTE, "\241", 26, ZINT_ERROR_TOO_LONG, -1, -1, "Error 542: Input too long for Version 1, requires 22 codewords (maximum 21)" },
  60. /* 16*/ { 2, 1, -1, "A", 21, 0, 23, 23, "" },
  61. /* 17*/ { 2, 1, -1, "A", 22, ZINT_ERROR_TOO_LONG, -1, -1, "Error 542: Input too long for Version 1, ECC 2, requires 18 codewords (maximum 17)" },
  62. /* 18*/ { 3, 1, -1, "A", 15, 0, 23, 23, "" },
  63. /* 19*/ { 3, 1, -1, "A", 16, ZINT_ERROR_TOO_LONG, -1, -1, "Error 542: Input too long for Version 1, ECC 3, requires 14 codewords (maximum 13)" },
  64. /* 20*/ { 4, 1, -1, "A", 10, 0, 23, 23, "" },
  65. /* 21*/ { 4, 1, -1, "A", 11, ZINT_ERROR_TOO_LONG, -1, -1, "Error 542: Input too long for Version 1, ECC 4, requires 10 codewords (maximum 9)" },
  66. };
  67. const int data_size = ARRAY_SIZE(data);
  68. int i, length, ret;
  69. struct zint_symbol *symbol = NULL;
  70. char data_buf[7829];
  71. char escaped[8196];
  72. char cmp_buf[32768];
  73. char cmp_msg[8196];
  74. int do_zxingcpp = (debug & ZINT_DEBUG_TEST_ZXINGCPP) && testUtilHaveZXingCPPDecoder(); /* Only do ZXing-C++ test if asked, too slow otherwise */
  75. testStartSymbol("test_large", &symbol);
  76. for (i = 0; i < data_size; i++) {
  77. if (testContinue(p_ctx, i)) continue;
  78. symbol = ZBarcode_Create();
  79. assert_nonnull(symbol, "Symbol not created\n");
  80. testUtilStrCpyRepeat(data_buf, data[i].pattern, data[i].length);
  81. 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));
  82. length = testUtilSetSymbol(symbol, BARCODE_HANXIN, -1 /*input_mode*/, -1 /*eci*/, data[i].option_1, data[i].option_2, data[i].option_3, -1 /*output_options*/, data_buf, data[i].length, debug);
  83. ret = ZBarcode_Encode(symbol, (unsigned char *) data_buf, length);
  84. assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
  85. assert_zero(strcmp(symbol->errtxt, data[i].expected_errtxt), "i:%d strcmp(%s, %s) != 0\n", i, symbol->errtxt, data[i].expected_errtxt);
  86. if (ret < ZINT_ERROR) {
  87. assert_equal(symbol->rows, data[i].expected_rows, "i:%d symbol->rows %d != %d\n", i, symbol->rows, data[i].expected_rows);
  88. assert_equal(symbol->width, data[i].expected_width, "i:%d symbol->width %d != %d\n", i, symbol->width, data[i].expected_width);
  89. if (do_zxingcpp && testUtilCanZXingCPP(i, symbol, data_buf, length, debug)) {
  90. int cmp_len, ret_len;
  91. char modules_dump[189 * 189 + 1];
  92. assert_notequal(testUtilModulesDump(symbol, modules_dump, sizeof(modules_dump)), -1, "i:%d testUtilModulesDump == -1\n", i);
  93. ret = testUtilZXingCPP(i, symbol, data_buf, length, modules_dump, cmp_buf, sizeof(cmp_buf), &cmp_len);
  94. assert_zero(ret, "i:%d %s testUtilZXingCPP ret %d != 0\n", i, testUtilBarcodeName(symbol->symbology), ret);
  95. ret = testUtilZXingCPPCmp(symbol, cmp_msg, cmp_buf, cmp_len, data_buf, length, NULL /*primary*/, escaped, &ret_len);
  96. assert_zero(ret, "i:%d %s testUtilZXingCPPCmp %d != 0 %s\n actual: %.*s\nexpected: %.*s\n",
  97. i, testUtilBarcodeName(symbol->symbology), ret, cmp_msg, cmp_len, cmp_buf, ret_len, escaped);
  98. }
  99. }
  100. ZBarcode_Delete(symbol);
  101. }
  102. testFinish();
  103. }
  104. static void test_options(const testCtx *const p_ctx) {
  105. int debug = p_ctx->debug;
  106. struct item {
  107. int option_1;
  108. int option_2;
  109. char *data;
  110. int ret_encode;
  111. int ret_vector;
  112. int expected_size;
  113. };
  114. /* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
  115. static const struct item data[] = {
  116. /* 0*/ { -1, -1, "12345", 0, 0, 23 }, /* Default version 1, ECC auto-set to 4 */
  117. /* 1*/ { 1, -1, "12345", 0, 0, 23 },
  118. /* 2*/ { -1, 2, "12345", 0, 0, 25 },
  119. /* 3*/ { -1, 85, "12345", 0, 0, 23 }, /* Version > max version 85 so ignored */
  120. /* 4*/ { -1, 84, "12345", 0, 0, 189 },
  121. /* 5*/ { 1, 1, "1234567890123456789012345678901234567890123456", ZINT_ERROR_TOO_LONG, -1, -1 },
  122. /* 6*/ { 4, 1, "1234567890123456", ZINT_ERROR_TOO_LONG, -1, -1 },
  123. /* 7*/ { 4, 2, "12345678901234567", 0, 0, 25 },
  124. /* 8*/ { 4, -1, "12345678901234567", 0, 0, 25 }, /* Version auto-set to 2 */
  125. /* 9*/ { -1, -1, "12345678901234567", 0, 0, 23 }, /* Version auto-set to 1, ECC auto-set to 3 */
  126. /* 10*/ { 5, -1, "12345678901234567", 0, 0, 23 }, /* ECC > max ECC 4 so ignored and auto-settings version 1, ECC 3 used */
  127. /* 11*/ { -1, -1, "1234567890123456789012345678901234567890123456", 0, 0, 25 }, /* Version auto-set to 2, ECC auto-set to 2 */
  128. };
  129. const int data_size = ARRAY_SIZE(data);
  130. int i, length, ret;
  131. struct zint_symbol *symbol = NULL;
  132. char escaped[1024];
  133. char cmp_buf[32768];
  134. char cmp_msg[1024];
  135. int do_zxingcpp = (debug & ZINT_DEBUG_TEST_ZXINGCPP) && testUtilHaveZXingCPPDecoder(); /* Only do ZXing-C++ test if asked, too slow otherwise */
  136. testStartSymbol("test_options", &symbol);
  137. for (i = 0; i < data_size; i++) {
  138. if (testContinue(p_ctx, i)) continue;
  139. symbol = ZBarcode_Create();
  140. assert_nonnull(symbol, "Symbol not created\n");
  141. length = testUtilSetSymbol(symbol, BARCODE_HANXIN, -1 /*input_mode*/, -1 /*eci*/, data[i].option_1, data[i].option_2, -1, -1 /*output_options*/, data[i].data, -1, debug);
  142. ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
  143. assert_equal(ret, data[i].ret_encode, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret_encode, symbol->errtxt);
  144. if (data[i].ret_vector != -1) {
  145. ret = ZBarcode_Buffer_Vector(symbol, 0);
  146. assert_equal(ret, data[i].ret_vector, "i:%d ZBarcode_Buffer_Vector ret %d != %d\n", i, ret, data[i].ret_vector);
  147. assert_equal(symbol->width, data[i].expected_size, "i:%d symbol->width %d != %d\n", i, symbol->width, data[i].expected_size);
  148. assert_equal(symbol->rows, data[i].expected_size, "i:%d symbol->rows %d != %d\n", i, symbol->rows, data[i].expected_size);
  149. }
  150. if (ret < ZINT_ERROR) {
  151. if (do_zxingcpp && testUtilCanZXingCPP(i, symbol, data[i].data, length, debug)) {
  152. int cmp_len, ret_len;
  153. char modules_dump[189 * 189 + 1];
  154. assert_notequal(testUtilModulesDump(symbol, modules_dump, sizeof(modules_dump)), -1, "i:%d testUtilModulesDump == -1\n", i);
  155. ret = testUtilZXingCPP(i, symbol, data[i].data, length, modules_dump, cmp_buf, sizeof(cmp_buf), &cmp_len);
  156. assert_zero(ret, "i:%d %s testUtilZXingCPP ret %d != 0\n", i, testUtilBarcodeName(symbol->symbology), ret);
  157. ret = testUtilZXingCPPCmp(symbol, cmp_msg, cmp_buf, cmp_len, data[i].data, length, NULL /*primary*/, escaped, &ret_len);
  158. assert_zero(ret, "i:%d %s testUtilZXingCPPCmp %d != 0 %s\n actual: %.*s\nexpected: %.*s\n",
  159. i, testUtilBarcodeName(symbol->symbology), ret, cmp_msg, cmp_len, cmp_buf, ret_len, escaped);
  160. }
  161. }
  162. ZBarcode_Delete(symbol);
  163. }
  164. testFinish();
  165. }
  166. static void test_input(const testCtx *const p_ctx) {
  167. int debug = p_ctx->debug;
  168. struct item {
  169. int input_mode;
  170. int eci;
  171. int option_3;
  172. char *data;
  173. int length;
  174. int ret;
  175. int expected_eci;
  176. char *expected;
  177. int zxingcpp_cmp;
  178. char *comment;
  179. };
  180. /*
  181. é U+00E9 in ISO 8859-1 plus other ISO 8859 (but not in ISO 8859-7 or ISO 8859-11), Win 1250 plus other Win, in GB 18030 0xA8A6, UTF-8 C3A9
  182. β U+03B2 in ISO 8859-7 Greek 0xE2 (but not other ISO 8859 or Win page), in GB 18030 0xA6C2, UTF-8 CEB2
  183. ÿ U+00FF in ISO 8859-1 0xFF, not in GB 18030, outside first byte and second byte range, UTF-8 C3BF
  184. PAD U+0080 GB 18030 4-byte Region 0x81308130, UTF-8 C280 (\302\200)
  185. 啊 U+554A GB 18030 Region One 0xB0A1, UTF-8 E5958A
  186. 亍 U+4E8D GB 18030 Region Two 0xD8A1, UTF-8 E4BA8D
  187. 齄 U+9F44 GB 18030 Region Two 0xF7FE, UTF-8 E9BD84
  188. 丂 U+4E02 GB 18030 2-byte Region 0x8140, UTF-8 E4B882
  189. � (REPLACEMENT CHARACTER) U+FFFD GB 18030 4-byte Region 0x81308130, UTF-8 EFBFBD (\357\277\275)
  190. */
  191. static const struct item data[] = {
  192. /* 0*/ { UNICODE_MODE, 0, -1, "é", -1, 0, 0, "30 00 F4 80 00 00 00 00 00", 1, "B1 (ISO 8859-1)" },
  193. /* 1*/ { UNICODE_MODE, 3, -1, "é", -1, 0, 3, "80 33 00 0F 48 00 00 00 00", 1, "ECI-3 B1 (ISO 8859-1)" },
  194. /* 2*/ { UNICODE_MODE, 29, -1, "é", -1, 0, 29, "81 D4 FC FF FF 00 00 00 00", 1, "ECI-29 H(1)1 (GB 2312)" },
  195. /* 3*/ { UNICODE_MODE, 32, -1, "é", -1, 0, 32, "82 04 FC FF FF 00 00 00 00", 1, "ECI-32 H(1)1 (GB 18030) (Region One)" },
  196. /* 4*/ { UNICODE_MODE, 26, -1, "é", -1, 0, 26, "81 A3 00 16 1D 48 00 00 00", 1, "ECI-26 B2 (UTF-8)" },
  197. /* 5*/ { UNICODE_MODE, 26, ZINT_FULL_MULTIBYTE, "é", -1, 0, 26, "81 A4 70 2F FF 00 00 00 00", 1, "ECI-26 H(1)1 (Region One) (UTF-8) (full multibyte)" },
  198. /* 6*/ { DATA_MODE, 0, -1, "é", -1, 0, 0, "30 01 61 D4 80 00 00 00 00", 1, "B2 (UTF-8)" },
  199. /* 7*/ { DATA_MODE, 0, ZINT_FULL_MULTIBYTE, "é", -1, 0, 0, "47 02 FF F0 00 00 00 00 00", 1, "H(1)1 (UTF-8) (Region One) (full multibyte)" },
  200. /* 8*/ { DATA_MODE, 0, -1, "\351", -1, 0, 0, "30 00 F4 80 00 00 00 00 00", 1, "B1 (ISO 8859-1) (0xE9)" },
  201. /* 9*/ { UNICODE_MODE, 0, -1, "β", -1, ZINT_WARN_NONCOMPLIANT, 0, "Warning 30 01 53 61 00 00 00 00 00", 1, "B2 (GB 18030) (2-byte Region)" },
  202. /* 10*/ { UNICODE_MODE, 9, -1, "β", -1, 0, 9, "80 93 00 0F 10 00 00 00 00", 1, "ECI-9 B1 (ISO 8859-7)" },
  203. /* 11*/ { UNICODE_MODE, 29, -1, "β", -1, 0, 29, "81 D3 00 15 36 10 00 00 00", 1, "ECI-29 B2 (GB 2312)" },
  204. /* 12*/ { UNICODE_MODE, 32, -1, "β", -1, 0, 32, "82 03 00 15 36 10 00 00 00", 1, "ECI-32 B2 (GB 18030) (2-byte Region)" },
  205. /* 13*/ { UNICODE_MODE, 26, -1, "β", -1, 0, 26, "81 A3 00 16 75 90 00 00 00", 1, "ECI-26 B2 (UTF-8)" },
  206. /* 14*/ { UNICODE_MODE, 26, ZINT_FULL_MULTIBYTE, "β", -1, 0, 26, "81 A4 B1 5F FF 00 00 00 00", 1, "ECI-26 B2 (UTF-8) (full multibyte)" },
  207. /* 15*/ { DATA_MODE, 0, -1, "β", -1, 0, 0, "30 01 67 59 00 00 00 00 00", 1, "B2 (UTF-8)" },
  208. /* 16*/ { DATA_MODE, 0, ZINT_FULL_MULTIBYTE, "β", -1, 0, 0, "4B 15 FF F0 00 00 00 00 00", 1, "H(1)1 (UTF-8) (Region One) (full multibyte)" },
  209. /* 17*/ { UNICODE_MODE, 0, -1, "ÿ", -1, 0, 0, "30 00 FF 80 00 00 00 00 00", 1, "B1 (ISO 8859-1)" },
  210. /* 18*/ { UNICODE_MODE, 0, -1, "ÿÿÿ", -1, 0, 0, "30 01 FF FF FF 80 00 00 00", 1, "B3 (ISO 8859-1)" },
  211. /* 19*/ { UNICODE_MODE, 0, -1, "\302\200", -1, ZINT_WARN_NONCOMPLIANT, 0, "Warning 70 00 00 00 00 00 00 00 00", 1, "H(f)1 (GB 18030) (4-byte Region) (not DATA_MODE so GB 18030 mapping)" },
  212. /* 20*/ { UNICODE_MODE, 0, ZINT_FULL_MULTIBYTE, "\302\200", -1, ZINT_WARN_NONCOMPLIANT, 0, "Warning 70 00 00 00 00 00 00 00 00", 1, "H(f)1 (GB 18030) (4-byte Region)" },
  213. /* 21*/ { DATA_MODE, 0, 0, "\302\200", -1, 0, 0, "30 01 61 40 00 00 00 00 00", 1, "B2 (UTF-8)" },
  214. /* 22*/ { DATA_MODE, 0, ZINT_FULL_MULTIBYTE, "\302\200", -1, 0, 0, "30 01 61 40 00 00 00 00 00", 1, "B2 (UTF-8) (full multibyte)" },
  215. /* 23*/ { UNICODE_MODE, 0, -1, "\302\200�", -1, ZINT_WARN_NONCOMPLIANT, 0, "Warning 70 00 00 38 26 7E 40 00 00", 1, "H(f)2 (GB 18030) (both 4-byte Region) (not DATA_MODE so GB 18030 mapping)" },
  216. /* 24*/ { UNICODE_MODE, 0, ZINT_FULL_MULTIBYTE, "\302\200�", -1, ZINT_WARN_NONCOMPLIANT, 0, "Warning 70 00 00 38 26 7E 40 00 00", 1, "H(f)2 (GB 18030) (both 4-byte Region)" },
  217. /* 25*/ { UNICODE_MODE, 0, -1, "啊亍齄丂\302\200", -1, ZINT_WARN_NONCOMPLIANT, 0, "Warning 64 68 50 3C AC 28 80 00 FF FE E0 00 00", 1, "H(d)4 H(f)1 (GB 18030)" },
  218. /* 26*/ { DATA_MODE, 0, -1, "\177\177", -1, 0, 0, "2F BD F7 F0 00 00 00 00 00", 1, "T2 (ASCII)" },
  219. /* 27*/ { DATA_MODE, 0, -1, "\177\177\177", -1, 0, 0, "2F BD F7 DF C0 00 00 00 00", 1, "T3 (ASCII)" },
  220. /* 28*/ { UNICODE_MODE, 0, -1, "123", -1, 0, 0, "11 EF FF 00 00 00 00 00 00", 1, "N3 (ASCII)" },
  221. /* 29*/ { UNICODE_MODE, 0, -1, "12345", -1, 0, 0, "11 EC 2D FF 80 00 00 00 00", 1, "N5 (ASCII)" },
  222. /* 30*/ { UNICODE_MODE, 0, -1, "Aa%$Bb9", -1, 0, 0, "22 A4 FA 18 3E 2E 52 7F 00", 1, "T7 (ASCII)" },
  223. /* 31*/ { UNICODE_MODE, 0, -1, "Summer Palace Ticket for 6 June 2015 13:00;2015年6月6日夜01時00分PM頤和園のチケット;2015년6월6일13시오후여름궁전티켓.2015年6月6号下午13:00的颐和园门票;", -1, ZINT_WARN_NONCOMPLIANT, 0, "Warning (171) 27 38 C3 0A 35 F9 CF 99 92 F9 26 A3 E7 3E 76 C9 AE A3 7F CC 09 C4 0C CD EE 44 06 C4", 1, "T20 B78 H(f)2 T2 H(f)18 B35 (GB 18030)" },
  224. /* 32*/ { DATA_MODE, 0, -1, "Summer Palace Ticket for 6 June 2015 13:00;2015年6月6日夜01時00分PM頤和園のチケット;2015년6월6일13시오후여름궁전티켓.2015年6月6号下午13:00的颐和园门票;", -1, 0, 0, "(209) 27 38 C3 0A 35 F9 CF 99 92 F9 26 A3 E7 3E 76 C9 AE A3 7F CC 15 04 0C CD EE 44 06 C4", 1, "T20 B117 (UTF-8)" },
  225. /* 33*/ { UNICODE_MODE, 0, -1, "\000\014\033 #/059:<@AMZ", 15, 0, 0, "2F 80 31 B7 1F AF E0 05 27 EB 2E CB E2 96 8F F0 00", 1, "T15 (ASCII)" },
  226. /* 34*/ { UNICODE_MODE, 0, -1, "Z[\\`alz{~\177", -1, 0, 0, "28 FE CF 4E 3E 92 FF 7E E7 CF 7F 00 00", 1, "T10 (ASCII)" },
  227. /* 35*/ { DATA_MODE, 26, ZINT_FULL_MULTIBYTE, "\202\061\203\063", -1, 0, 26, "81 A7 01 B1 D8 00 00 00 00", 0, "ECI-26 H(f)1 (GB 18030) (Invalid UTF-8, forces GB 2312/18030 utf8tosb() difference) NOTE: 2021-01-10 now UTF-8 is checked and mode -> DATA_MODE this test no longer shows difference; ZXing-C++ returns null string" },
  228. /* 36*/ { UNICODE_MODE, 128, 0, "A", -1, 0, 128, "88 08 02 2B F0 00 00 00 00", 1, "ECI > 127" },
  229. /* 37*/ { UNICODE_MODE, 16364, 0, "A", -1, 0, 16364, "8B FE C2 2B F0 00 00 00 00", 1, "ECI > 16363" },
  230. /* 38*/ { UNICODE_MODE, 0, -1, "啊啊啊亍", -1, ZINT_WARN_NONCOMPLIANT, 0, "Warning 40 00 00 00 00 FF E0 00 FF F0 00 00 00", 1, "Region One (FFE terminator) -> Region Two (no indicator)" },
  231. /* 39*/ { UNICODE_MODE, 0, -1, "亍亍亍啊", -1, ZINT_WARN_NONCOMPLIANT, 0, "Warning 50 00 00 00 00 FF E0 00 FF F0 00 00 00", 1, "Region Two (FFE terminator) -> Region One (no indicator)" },
  232. /* 40*/ { UNICODE_MODE, 0, -1, "啊啊啊啊亍亍啊", -1, ZINT_WARN_NONCOMPLIANT, 0, "Warning 40 00 00 00 00 00 0F FE 00 00 00 FF E0 00 FF F0 00", 1, "Region One (FFE) -> Region Two (FFE) -> Region One" },
  233. /* 41*/ { UNICODE_MODE, 0, -1, "亍亍亍亍啊啊亍", -1, ZINT_WARN_NONCOMPLIANT, 0, "Warning 50 00 00 00 00 00 0F FE 00 00 00 FF E0 00 FF F0 00", 1, "Region Two (FFE) -> Region One (FFE) -> Region Two" },
  234. /* 42*/ { DATA_MODE, 0, ZINT_FULL_MULTIBYTE | (2 << 8), "é", -1, 0, 0, "47 02 FF F0 00 00 00 00 00", 1, "H(1)1 (UTF-8) (Region One) (full multibyte with mask)" },
  235. /* 43*/ { UNICODE_MODE, 0, -1, "˘", -1, ZINT_WARN_NONCOMPLIANT, 0, "Warning 70 01 16 80 00 00 00 00 00", 1, "H(f)1 (GB 18030)" },
  236. /* 44*/ { UNICODE_MODE, 4, -1, "˘", -1, 0, 4, "80 43 00 0D 10 00 00 00 00", 1, "ECI-4 B1 (ISO 8859-2)" },
  237. /* 45*/ { UNICODE_MODE, 0, -1, "Ħ", -1, ZINT_WARN_NONCOMPLIANT, 0, "Warning 70 00 47 80 00 00 00 00 00", 1, "H(f)1 (GB 18030)" },
  238. /* 46*/ { UNICODE_MODE, 5, -1, "Ħ", -1, 0, 5, "80 53 00 0D 08 00 00 00 00", 1, "ECI-5 B1 (ISO 8859-3)" },
  239. /* 47*/ { UNICODE_MODE, 0, -1, "ĸ", -1, ZINT_WARN_NONCOMPLIANT, 0, "Warning 70 00 50 00 00 00 00 00 00", 1, "H(f)1 (GB 18030)" },
  240. /* 48*/ { UNICODE_MODE, 6, -1, "ĸ", -1, 0, 6, "80 63 00 0D 10 00 00 00 00", 1, "ECI-6 B1 (ISO 8859-4)" },
  241. /* 49*/ { UNICODE_MODE, 0, -1, "Ж", -1, ZINT_WARN_NONCOMPLIANT, 0, "Warning 30 01 53 D4 00 00 00 00 00", 1, "B2 (GB 18030)" },
  242. /* 50*/ { UNICODE_MODE, 7, -1, "Ж", -1, 0, 7, "80 73 00 0D B0 00 00 00 00", 1, "ECI-7 B1 (ISO 8859-5)" },
  243. /* 51*/ { UNICODE_MODE, 0, -1, "Ș", -1, ZINT_WARN_NONCOMPLIANT, 0, "Warning 70 00 B9 80 00 00 00 00 00", 1, "H(f)1 (GB 18030)" },
  244. /* 52*/ { UNICODE_MODE, 18, -1, "Ș", -1, 0, 18, "81 23 00 0D 50 00 00 00 00", 1, "ECI-18 B1 (ISO 8859-16)" },
  245. /* 53*/ { UNICODE_MODE, 0, -1, "テ", -1, ZINT_WARN_NONCOMPLIANT, 0, "Warning 30 01 52 E3 00 00 00 00 00", 1, "B2 (GB 18030)" },
  246. /* 54*/ { UNICODE_MODE, 20, -1, "テ", -1, 0, 20, "81 43 00 14 1B 28 00 00 00", 1, "ECI-20 B2 (SHIFT JIS)" },
  247. /* 55*/ { UNICODE_MODE, 20, -1, "テテ", -1, 0, 20, "81 43 00 24 1B 2C 1B 28 00", 1, "ECI-20 B4 (SHIFT JIS)" },
  248. /* 56*/ { UNICODE_MODE, 20, -1, "\\\\", -1, 0, 20, "81 43 00 24 0A FC 0A F8 00", 0, "ECI-20 B4 (SHIFT JIS); ZXing-C++ does straight-through ASCII conversion for Shift JIS" },
  249. /* 57*/ { UNICODE_MODE, 0, -1, "…", -1, ZINT_WARN_NONCOMPLIANT, 0, "Warning 4E BC FF F0 00 00 00 00 00", 1, "H(1)1 (GB 18030)" },
  250. /* 58*/ { UNICODE_MODE, 21, -1, "…", -1, 0, 21, "81 53 00 0C 28 00 00 00 00", 1, "ECI-21 B1 (Win 1250)" },
  251. /* 59*/ { UNICODE_MODE, 0, -1, "Ґ", -1, ZINT_WARN_NONCOMPLIANT, 0, "Warning 70 01 B9 00 00 00 00 00 00", 1, "H(f)1 (GB 18030)" },
  252. /* 60*/ { UNICODE_MODE, 22, -1, "Ґ", -1, 0, 22, "81 63 00 0D 28 00 00 00 00", 1, "ECI-22 B1 (Win 1251)" },
  253. /* 61*/ { UNICODE_MODE, 0, -1, "˜", -1, ZINT_WARN_NONCOMPLIANT, 0, "Warning 70 01 18 00 00 00 00 00 00", 1, "H(f)1 (GB 18030)" },
  254. /* 62*/ { UNICODE_MODE, 23, -1, "˜", -1, 0, 23, "81 73 00 0C C0 00 00 00 00", 1, "ECI-23 B1 (Win 1252)" },
  255. /* 63*/ { UNICODE_MODE, 24, -1, "پ", -1, 0, 24, "81 83 00 0C 08 00 00 00 00", 1, "ECI-24 B1 (Win 1256)" },
  256. /* 64*/ { UNICODE_MODE, 0, -1, "က", -1, ZINT_WARN_NONCOMPLIANT, 0, "Warning 70 07 71 00 00 00 00 00 00", 1, "H(f)1 (GB 18030)" },
  257. /* 65*/ { UNICODE_MODE, 25, -1, "က", -1, 0, 25, "81 92 F9 00 3F 00 00 00 00", 1, "ECI-25 T2 (UCS-2BE)" },
  258. /* 66*/ { UNICODE_MODE, 25, -1, "ကက", -1, 0, 25, "81 92 F9 00 10 03 F0 00 00", 1, "ECI-25 T4 (UCS-2BE)" },
  259. /* 67*/ { UNICODE_MODE, 25, -1, "12", -1, 0, 25, "81 93 00 20 01 88 01 90 00", 1, "ECI-25 B4 (UCS-2BE ASCII)" },
  260. /* 68*/ { UNICODE_MODE, 27, -1, "@", -1, 0, 27, "81 B2 FB 2F C0 00 00 00 00", 1, "ECI-27 T1 (ASCII)" },
  261. /* 69*/ { UNICODE_MODE, 0, -1, "龘", -1, ZINT_WARN_NONCOMPLIANT, 0, "Warning 30 01 7E C9 80 00 00 00 00", 1, "B2 (GB 18030)" },
  262. /* 70*/ { UNICODE_MODE, 28, -1, "龘", -1, 0, 28, "81 C3 00 17 CE A8 00 00 00", 1, "ECI-28 B2 (Big5)" },
  263. /* 71*/ { UNICODE_MODE, 28, -1, "龘龘", -1, 0, 28, "81 C3 00 27 CE AF CE A8 00", 1, "ECI-28 B4 (Big5)" },
  264. /* 72*/ { UNICODE_MODE, 0, -1, "齄", -1, ZINT_WARN_NONCOMPLIANT, 0, "Warning 5B BF FF F0 00 00 00 00 00", 1, "H(2)1 (GB 18030)" },
  265. /* 73*/ { UNICODE_MODE, 29, -1, "齄", -1, 0, 29, "81 D5 BB FF FF 00 00 00 00", 1, "ECI-29 H(2)1 (GB 2312)" },
  266. /* 74*/ { UNICODE_MODE, 32, -1, "齄", -1, 0, 32, "82 05 BB FF FF 00 00 00 00", 1, "ECI-32 H(2)1 (GB 18030)" },
  267. /* 75*/ { UNICODE_MODE, 29, -1, "齄齄", -1, 0, 29, "81 D5 BB FB BF FF F0 00 00", 1, "ECI-29 H(2)2 (GB 2312)" },
  268. /* 76*/ { UNICODE_MODE, 32, -1, "齄齄", -1, 0, 32, "82 05 BB FB BF FF F0 00 00", 1, "ECI-32 H(2)2 (GB 18030)" },
  269. /* 77*/ { UNICODE_MODE, 0, -1, "가", -1, ZINT_WARN_NONCOMPLIANT, 0, "Warning 70 2B 5E 80 00 00 00 00 00", 1, "H(f)1 (GB 18030)" },
  270. /* 78*/ { UNICODE_MODE, 30, -1, "가", -1, 0, 30, "81 E3 00 15 85 08 00 00 00", 1, "ECI-30 T2 (EUC-KR)" },
  271. /* 79*/ { UNICODE_MODE, 30, -1, "가가", -1, 0, 30, "81 E3 00 25 85 0D 85 08 00", 1, "ECI-30 B4 (EUC-KR)" },
  272. /* 80*/ { UNICODE_MODE, 170, -1, "?", -1, 0, 170, "88 0A A2 FB 1F C0 00 00 00", 1, "ECI-170 L1 (ASCII invariant)" },
  273. /* 81*/ { DATA_MODE, 899, -1, "\200", -1, 0, 899, "88 38 33 00 0C 00 00 00 00", 1, "ECI-899 B1 (8-bit binary)" },
  274. /* 82*/ { UNICODE_MODE, 900, -1, "é", -1, 0, 900, "88 38 43 00 16 1D 48 00 00", 0, "ECI-900 B2 (no conversion); ZXing-C++ test can't handle UNICODE_MODE binary" },
  275. /* 83*/ { DATA_MODE, 900, -1, "\303\251", -1, 0, 900, "88 38 43 00 16 1D 48 00 00", 1, "ECI-900 B2 (no conversion)" },
  276. /* 84*/ { UNICODE_MODE, 16384, -1, "é", -1, 0, 16384, "8C 04 00 03 00 16 1D 48 00", 0, "ECI-16384 B2 (no conversion); ZXing-C++ test can't handle UNICODE_MODE binary" },
  277. /* 85*/ { DATA_MODE, 16384, -1, "\303\251", -1, 0, 16384, "8C 04 00 03 00 16 1D 48 00", 1, "ECI-16384 B2 (no conversion)" },
  278. /* 86*/ { UNICODE_MODE, 3, -1, "β", -1, ZINT_ERROR_INVALID_DATA, 3, "Error 545: Invalid character in input for ECI '3'", 1, "" },
  279. /* 87*/ { GS1_MODE, -1, -1, "[10]01", -1, ZINT_ERROR_INVALID_OPTION, 0, "Error 220: Selected symbology does not support GS1 mode", 1, "" },
  280. };
  281. const int data_size = ARRAY_SIZE(data);
  282. int i, length, ret;
  283. struct zint_symbol *symbol = NULL;
  284. char escaped[1024];
  285. char cmp_buf[32768];
  286. char cmp_msg[1024];
  287. int do_zxingcpp = (debug & ZINT_DEBUG_TEST_ZXINGCPP) && testUtilHaveZXingCPPDecoder(); /* Only do ZXing-C++ test if asked, too slow otherwise */
  288. testStartSymbol("test_input", &symbol);
  289. for (i = 0; i < data_size; i++) {
  290. if (testContinue(p_ctx, i)) continue;
  291. symbol = ZBarcode_Create();
  292. assert_nonnull(symbol, "Symbol not created\n");
  293. debug |= ZINT_DEBUG_TEST; /* Needed to get codeword dump in errtxt */
  294. length = testUtilSetSymbol(symbol, BARCODE_HANXIN, data[i].input_mode, data[i].eci, -1 /*option_1*/, -1, data[i].option_3, -1 /*output_options*/, data[i].data, data[i].length, debug);
  295. ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
  296. assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
  297. if (p_ctx->generate) {
  298. printf(" /*%3d*/ { %s, %d, %s, \"%s\", %d, %s, %d, \"%s\", %d, \"%s\" },\n",
  299. i, testUtilInputModeName(data[i].input_mode), data[i].eci, testUtilOption3Name(BARCODE_HANXIN, data[i].option_3),
  300. testUtilEscape(data[i].data, length, escaped, sizeof(escaped)), data[i].length,
  301. testUtilErrorName(data[i].ret), ret < ZINT_ERROR ? symbol->eci : -1, symbol->errtxt,
  302. data[i].zxingcpp_cmp, data[i].comment);
  303. } else {
  304. if (ret < ZINT_ERROR) {
  305. assert_equal(symbol->eci, data[i].expected_eci, "i:%d eci %d != %d\n", i, symbol->eci, data[i].expected_eci);
  306. }
  307. assert_zero(strcmp(symbol->errtxt, data[i].expected), "i:%d strcmp(%s, %s) != 0\n", i, symbol->errtxt, data[i].expected);
  308. if (ret < ZINT_ERROR) {
  309. if (do_zxingcpp && testUtilCanZXingCPP(i, symbol, data[i].data, length, debug)) {
  310. if (!data[i].zxingcpp_cmp) {
  311. if (debug & ZINT_DEBUG_TEST_PRINT) printf("i:%d %s not ZXing-C++ compatible (%s)\n", i, testUtilBarcodeName(symbol->symbology), data[i].comment);
  312. } else {
  313. int cmp_len, ret_len;
  314. char modules_dump[189 * 189 + 1];
  315. assert_notequal(testUtilModulesDump(symbol, modules_dump, sizeof(modules_dump)), -1, "i:%d testUtilModulesDump == -1\n", i);
  316. ret = testUtilZXingCPP(i, symbol, data[i].data, length, modules_dump, cmp_buf, sizeof(cmp_buf), &cmp_len);
  317. assert_zero(ret, "i:%d %s testUtilZXingCPP ret %d != 0\n", i, testUtilBarcodeName(symbol->symbology), ret);
  318. ret = testUtilZXingCPPCmp(symbol, cmp_msg, cmp_buf, cmp_len, data[i].data, length, NULL /*primary*/, escaped, &ret_len);
  319. assert_zero(ret, "i:%d %s testUtilZXingCPPCmp %d != 0 %s\n actual: %.*s\nexpected: %.*s\n",
  320. i, testUtilBarcodeName(symbol->symbology), ret, cmp_msg, cmp_len, cmp_buf, ret_len, escaped);
  321. }
  322. }
  323. }
  324. }
  325. ZBarcode_Delete(symbol);
  326. }
  327. testFinish();
  328. }
  329. static void test_encode(const testCtx *const p_ctx) {
  330. int debug = p_ctx->debug;
  331. struct item {
  332. int input_mode;
  333. int eci;
  334. int option_1;
  335. int option_2;
  336. int option_3;
  337. char *data;
  338. int length;
  339. int ret;
  340. int expected_rows;
  341. int expected_width;
  342. char *comment;
  343. char *expected;
  344. };
  345. static const struct item data[] = {
  346. /* 0*/ { UNICODE_MODE, -1, -1, -1, -1, "1234", -1, 0, 23, 23, "Mode nnnn, mask 10",
  347. "11111110101011001111111"
  348. "10000000000000100000001"
  349. "10111110111011101111101"
  350. "10100000010111100000101"
  351. "10101110011101101110101"
  352. "10101110000101001110101"
  353. "10101110111001101110101"
  354. "00000000100000000000000"
  355. "00010101101110000000000"
  356. "01010110110001011011101"
  357. "00100011000100100100101"
  358. "01110111111110001000111"
  359. "01001001110000001001000"
  360. "00100101001111110010000"
  361. "00000000011110110101000"
  362. "00000000001011100000000"
  363. "11111110110111101110101"
  364. "00000010011010001110101"
  365. "11111010101101001110101"
  366. "00001010100111000000101"
  367. "11101010111001101111101"
  368. "11101010111111000000001"
  369. "11101010000100101111111"
  370. },
  371. /* 1*/ { UNICODE_MODE, -1, 2, -1, -1, "Hanxin Code symbol", -1, 0, 25, 25, "ISO 20830 Figure 1 same",
  372. "1111111010110110101111111"
  373. "1000000000111101100000001"
  374. "1011111011100101101111101"
  375. "1010000010110010100000101"
  376. "1010111000110100101110101"
  377. "1010111001110110101110101"
  378. "1010111010101001001110101"
  379. "0000000011010101000000000"
  380. "0001011001010001010000000"
  381. "0110100011111001010001011"
  382. "0011001010100011101101011"
  383. "1000000000001101111111100"
  384. "0000011000011000100100110"
  385. "1101100011110010010011101"
  386. "1010001101011111111100011"
  387. "1010011001100100100010111"
  388. "0000000100010101001101000"
  389. "0000000000011111100000000"
  390. "1111111000100100101110101"
  391. "0000001011001111001110101"
  392. "1111101010011001001110101"
  393. "0000101010100100100000101"
  394. "1110101011100100101111101"
  395. "1110101010000010000000001"
  396. "1110101011000100101111111"
  397. },
  398. /* 2*/ { UNICODE_MODE, -1, -1, 24, 3 << 8, "汉信码标准\015\012中国物品编码中心\015\012北京网路畅想科技发展有限公司\015\012张成海、赵楠、黄燕滨、罗秋科、王毅、张铎、王越\015\012施煜、边峥、修兴强\015\012汉信码标准\015\012中国物品编码中心\015\012北京网路畅想科技发展有限公司", -1, ZINT_WARN_NONCOMPLIANT, 69, 69, "ISO 20830 Figure 2 **NOT SAME** different encodation, Binary mode not used by figure, nor Region One/Two 0xFFE switching (same if force mode 11111tt11111111tt11111111111111tt11111211111111111112111tt121121111tt11111tt11111111tt11111111111111 and disable Region One/Two 0xFFE switch",
  399. "111111100000010101011111111111111111000001110110100100011010101111111"
  400. "100000001000101000000000000000000010100000101100000001101001100000001"
  401. "101111100010110110110000010011001010001011001011111000011101001111101"
  402. "101000001101000000011101000001111011111011100100111011110111100000101"
  403. "101011100011110001100101001011100010111111001000111100100100101110101"
  404. "101011100111101110110010000000000011101010010011101100010110001110101"
  405. "101011101010101010011011010010010010010010010010010010010010001110101"
  406. "000000001010001100000001110111011011010111111011100110110110100000000"
  407. "001011001111000111100001011111111010110011111101011111001110010000000"
  408. "110010110010111110111011010101001011101101111100111000010011011101101"
  409. "101110110110101010111111111000001011000000011011110111001110011000110"
  410. "101111000000000110111110011011011010010000100011111111111111111111111"
  411. "110010010000101100011100110011011011000110111101000011101000101011001"
  412. "100010100000100100100101000001110011100101000011011011110000000001110"
  413. "100111000011001010001111101011100011100111110111110011100000011111111"
  414. "100000110101001110001001110001110011000100110100010100011010110110110"
  415. "110011011011110101001001001001001011001001001001001000001111111101000"
  416. "111111111111111111001111011011111011111111111111111101111110011110101"
  417. "000000000000000001100011001011111000000000000000000110010001010000000"
  418. "110110011110001101011100110001011111000010110000100111001001001010101"
  419. "101101111100100001001001111011001001001001011100110100010110000011100"
  420. "011110010100101001111000101100000000010110100101000100111001011001011"
  421. "111001001001001001001001001001001001110000101101010110011000000011001"
  422. "100101011011010101001010000011001000110100111001010100001010011000101"
  423. "100000000100100101111000011010110011000101110110100111110100010001001"
  424. "001111101111001001100011101100001110101100100000100111011000100101111"
  425. "011111011011000001000101100010011110101100010111110111111111111111111"
  426. "010010010111001001000010000111000001111011101010000111101100111111110"
  427. "110111011000101001100001010100010001010110110111010111000011010000010"
  428. "101100010001010001001001100101110101001000011100100111000101010000101"
  429. "100010011001001001111111110000001110011111100010110101111101101010000"
  430. "010011110010110001101001001001001001001001000110110101100000100101100"
  431. "100100011010110001110111000100110110011010000111100111111000110110001"
  432. "000111000101011101001010010000001000101101011110110100100010110000100"
  433. "100001110000101001111111111111111110101011101111100111111111111111111"
  434. "000010011101101000000000000000000011110101101011110000000000000000001"
  435. "101110101101101011000001000011001011010011111100011110110101001000001"
  436. "101001001001001001001001111111100011010111110000100100111110101110001"
  437. "111010111101101011100001010101100010000001011000111111010101110001101"
  438. "110101101101100111110000010100100011000110100101101101101110001011101"
  439. "110111111001111011011000111001101011100010001010010011010010000010101"
  440. "111011110110100000001101000000001011000011111111111111111111111110001"
  441. "101101100110000110110010000011111011101101011010110111001111010001001"
  442. "110100010111011011000100000001110010110111101000111010101100010111101"
  443. "110101000101110010100011111001000010011111111001011010001111000101001"
  444. "111100110010110100110000111001111011101110110010101110100111001011101"
  445. "100100101010010001001001001001001011001000110000010110101010100000001"
  446. "100000100000010101001100101001111010110100000101100000111100011100001"
  447. "111101001111100101011110011001100011001010001001110101111111011001001"
  448. "111000110000111001100101000010110011001010001110110100010110101111101"
  449. "100111001001010101110001010011110011011111111110000001100111111111100"
  450. "111111111111111111010010010010011011111111111111111101100010000111001"
  451. "000000000000000001110011001010110000000000000000000110101011111101000"
  452. "001010010101010001010011101100101101010110000101110111010011101010111"
  453. "000000101111101101011110000110011001100110000111000101010011000010100"
  454. "110000010111110101011100101110000111110000001110010111011001000111001"
  455. "010001011000000101001111001010101111111111111111110111111110010110101"
  456. "001110100110111101101101110011010000101111100110000111100011000111111"
  457. "110111101011110101000001101000011001000111000100110100010101101110001"
  458. "001010010111110001101110111111000010010101101011110101000100001011100"
  459. "000000010100000101101001100011110110000111101011110110111101100110100"
  460. "000000001110100001111111001001001001001001001001000101001100100000000"
  461. "111111100000001101101111110101111101000000111010000101110001101110101"
  462. "000000100010001101101110011011101000001000000111110110010011001110101"
  463. "111110101110111001110110010111000001010100011111010100010110001110101"
  464. "000010101101010001101101011100110110111100100000010100100100100000101"
  465. "111010100001110001011110100111100101101101100011010101011011001111101"
  466. "111010101000100001010101001001000000010001001001000101001001100000001"
  467. "111010101111111101111111111111111010111111111111110111111111001111111"
  468. },
  469. /* 3*/ { UNICODE_MODE, -1, 1, 1, -1, "1234567890", -1, 0, 23, 23, "ISO 20830 K.2 Figure K.8 (& K.5) same (mask 01)",
  470. "11111110001000001111111"
  471. "10000000110001100000001"
  472. "10111110001010101111101"
  473. "10100000111011100000101"
  474. "10101110010000101110101"
  475. "10101110110101001110101"
  476. "10101110001100001110101"
  477. "00000000011101100000000"
  478. "00010101001010011000000"
  479. "01001101111101010101110"
  480. "10101010101010100101101"
  481. "01010010111101010101010"
  482. "10101010101010101010100"
  483. "10000011010101000011110"
  484. "00000011001010010101000"
  485. "00000000110100000000000"
  486. "11111110011110001110101"
  487. "00000010010101101110101"
  488. "11111010101010001110101"
  489. "00001010110010100000101"
  490. "11101010100010001111101"
  491. "11101010110101100000001"
  492. "11101010001010001111111"
  493. },
  494. /* 4*/ { UNICODE_MODE, -1, 1, 1, 1 << 8, "1234567890", -1, 0, 23, 23, "ISO 20830 K.2 Figure K.4, with explicit mask pattern 00",
  495. "11111110100010101111111"
  496. "10000000000100100000001"
  497. "10111110000000101111101"
  498. "10100000001110000000101"
  499. "10101110111010101110101"
  500. "10101110000000001110101"
  501. "10101110000110001110101"
  502. "00000000001000100000000"
  503. "00010101000000100000000"
  504. "00011000101000000000100"
  505. "00000000000000001111000"
  506. "00000111101000000000000"
  507. "00000000000000000000001"
  508. "11010110000000010110100"
  509. "00000000100000010101000"
  510. "00000000100001000000000"
  511. "11111110010100001110101"
  512. "00000010000000001110101"
  513. "11111010100000101110101"
  514. "00001010000111000000101"
  515. "11101010101000001111101"
  516. "11101010100000000000001"
  517. "11101010100000101111111"
  518. },
  519. /* 5*/ { UNICODE_MODE, -1, 1, 1, 3 << 8, "1234567890", -1, 0, 23, 23, "ISO 20830 K.2 Figure K.6, with explicit mask pattern 10",
  520. "11111110001011101111111"
  521. "10000000100000000000001"
  522. "10111110011111001111101"
  523. "10100000000111000000101"
  524. "10101110011110101110101"
  525. "10101110011111101110101"
  526. "10101110101111101110101"
  527. "00000000001100000000000"
  528. "00010101011111010000000"
  529. "01010001100001001001101"
  530. "00100100100100101011100"
  531. "11111000010111111111111"
  532. "01001001001001001001000"
  533. "11110010100100110010000"
  534. "00000001011111010101000"
  535. "00000000001000000000000"
  536. "11111110110000101110101"
  537. "00000010111111001110101"
  538. "11111010101001001110101"
  539. "00001010000011000000101"
  540. "11101010010111001111101"
  541. "11101010001001100000001"
  542. "11101010100100001111111"
  543. },
  544. /* 6*/ { UNICODE_MODE, -1, 1, 1, 4 << 8, "1234567890", -1, 0, 23, 23, "ISO 20830 K.2 Figure K.7, with explicit mask pattern 11",
  545. "11111110101111001111111"
  546. "10000000000011000000001"
  547. "10111110000000001111101"
  548. "10100000110110100000101"
  549. "10101110100010101110101"
  550. "10101110100111101110101"
  551. "10101110111111101110101"
  552. "00000000001111000000000"
  553. "00010101000111101000000"
  554. "00000010110000111000011"
  555. "10011010011111001000011"
  556. "11000010000111000111000"
  557. "01000101101110111000110"
  558. "00010001101101010001100"
  559. "00000010110010010101000"
  560. "00000000010011000000000"
  561. "11111110100110101110101"
  562. "00000010101101101110101"
  563. "11111010101101101110101"
  564. "00001010101010100000101"
  565. "11101010011010001111101"
  566. "11101010011010000000001"
  567. "11101010011010101111111"
  568. },
  569. /* 7*/ { UNICODE_MODE, -1, 3, 10, -1, "1234567890ABCDEFGabcdefg,Han Xin Code", -1, 0, 41, 41, "**NOT SAME** as ISO 20830 K.3 Figure K.16 (& K.14), different encodation (N9 A28 (6 padbits) vs. N10 A27 (2 padbits)); same if same encoding modes forced (happens to use same mask pattern 00) (forced encoding mode: nnnnnnnnnnttttttttttttttttttttttttttt)",
  570. "11111110001011000010101111011110101111111"
  571. "10000000011001010100001111000111100000001"
  572. "10111110111111111100011010110100101111101"
  573. "10100000101001001001001001001001100000101"
  574. "10101110000100100101010010010000001110101"
  575. "10101110000000011111110010111100101110101"
  576. "10101110101101001001010111010001001110101"
  577. "00000000001110100100100100100100100000000"
  578. "00011110111111111111111001101110110000000"
  579. "11101011010010011111010011010111001001001"
  580. "10100010011010100100100100100100100100100"
  581. "11111111001110100110010100010101100011110"
  582. "11000110001001000000000101011110001001001"
  583. "10100100100100100100100101011011001011001"
  584. "11001001111110000011111111111111000000110"
  585. "10011011001001001001001001001001001001000"
  586. "11010110001100011000111001001100100100100"
  587. "11111111000111100011010111111111111111111"
  588. "11001001001001001001001010101101000010101"
  589. "10001001100100100100100110100110011011100"
  590. "11111111111111111111101111111111111111101"
  591. "00000000000000000000101001001001001011100"
  592. "00110111101100111010110101100110100100100"
  593. "11111100100000010100111111111111111111111"
  594. "01001001001001010000110000101010110001100"
  595. "11001100100100100100100100001010010010101"
  596. "11111111111111111110111111111111111110010"
  597. "01110000110011010110111011011001001001001"
  598. "00101010010001001110100100100100100100100"
  599. "11111111111100011100101100000110110100100"
  600. "01101001001001001000101010101111100101101"
  601. "00100100100100100100100100100100010000101"
  602. "00000001111110010110100101111000101111000"
  603. "00000000100001001000101001001010000000000"
  604. "11111110010010100100100100100100101110101"
  605. "00000010111111111110111111111111001110101"
  606. "11111010001011011010100101111000001110101"
  607. "00001010111000001010100010100100100000101"
  608. "11101010111111111100101100111111101111101"
  609. "11101010101001001000101001001001000000001"
  610. "11101010100100100100111111111111001111111"
  611. },
  612. /* 8*/ { UNICODE_MODE, -1, 2, 17, -1, "Summer Palace Ticket for 6 June 2015 13:00;2015年6月6日夜01時00分PM頤和園のチケット;2015년6월6일13시오후여름궁전티켓.2015年6月6号下午13:00的颐和园门票;", -1, ZINT_WARN_NONCOMPLIANT, 55, 55, "**NOT SAME** as ISO 20830 K.4 Figure K.23, different encodation; if same encoding modes forced, uses mask pattern 01 instead of pattern 10, but matches pattern 01 example Figure K.20 (forced encoding mode: ttttttttttttttttttttttttttttttttttttttttttttttt1t1t11ttdtt1ttddddddddtttttfftfftffttffffffffffffffffffttttt1t1t111ttttt111111t)",
  613. "1111111001111111111011100100110101101010101100101111111"
  614. "1000000000000000001100011000011001000010101111100000001"
  615. "1011111010001111001111010100100000101010011010101111101"
  616. "1010000001001001001110010011010101000110100011000000101"
  617. "1010111001111110101100000100101101110010101010001110101"
  618. "1010111011010101001101010110011010011000010110001110101"
  619. "1010111001101001001001110010001001100100001001001110101"
  620. "0000000011100111101111000100011010001100110001000000000"
  621. "0010010101100110101110110010111101110110110010101000000"
  622. "1100001011111001001000101011000000110101010101010101010"
  623. "1010101001010000001110100110100101100011101000111110110"
  624. "0011100111010001101011001101001000001111110000110100011"
  625. "1000001010111011001101011100010111110101000110100001100"
  626. "1110111101010101001101010101010101101010110000001101000"
  627. "0000000100111001001010101100101100000001011100000000101"
  628. "1001100010010111001110110101110011010001100000110100011"
  629. "0100010111111001001100010011100001101010101010101010101"
  630. "0001000111000001101001110011111000010010000011110101100"
  631. "1001000100000110001111111111111111111000110101101001101"
  632. "0011010011110101100000000000000000001000110010101000000"
  633. "1000000001001000100010111101101011101000010011001011001"
  634. "1101010101010101010101010001111110001001011010100111101"
  635. "1101010011001001100110000001010101001011100000101110010"
  636. "1000111001010110001110110011010101001100101101001101110"
  637. "1001100001001010001100110100101010101010101010101010101"
  638. "1011100101000000001100101011001100001001110111011001000"
  639. "1001100100010000110001011011101100001010011001101011000"
  640. "1011000101001000001100010100001101101100100100110011111"
  641. "1100101010101010101010101010111001101101001000111001100"
  642. "1101000111010110010101100101011000001110011100100011111"
  643. "1101011101101100001011110011011010101110101001100110011"
  644. "1000001110000100100001001110000011001101010101010101010"
  645. "1010100000110010100111100011110010001010001001101110011"
  646. "1100110001011100011110010000101011101011110110011001000"
  647. "1101110110101010101111111101110010001110011100001010110"
  648. "1101110011010101010101010101010101001000101101001010101"
  649. "1111111111111111111110001011001010101111111111111111111"
  650. "0000000000000000001110000010010000000000000000000000001"
  651. "0100100111110100001111000111010001001111011011101011001"
  652. "1111100101001100001111011010110010111100110101000010001"
  653. "0110101010101010101010100100001110001110000100111000101"
  654. "1000110011110001101000011011111101100000001011100000001"
  655. "1111001110101101101110110010100100100101000100100101001"
  656. "0100110001110100001100111110110101010101010101010101001"
  657. "1000101110011101001100100000000010010100010000001110101"
  658. "1101100101011000001111000111010100001101111001100110001"
  659. "0000001010011010001001000100101011101101010010010100100"
  660. "0000000000101111001000111110000110000101010101100000000"
  661. "1111111000101010101010101101100101111101000111001110101"
  662. "0000001000011011001010000100010101001110001111101110101"
  663. "1111101000100001101010011000110011101011101000001110101"
  664. "0000101001001110001110110101000101101100010101000000101"
  665. "1110101011010110001001010011011111001011110010101111101"
  666. "1110101011010101001101010101010101000010110110000000001"
  667. "1110101010101101001111111111111111101010010010001111111"
  668. },
  669. /* 9*/ { UNICODE_MODE, -1, -1, -1, -1, "汉信码标准", -1, ZINT_WARN_NONCOMPLIANT, 23, 23, "ISO 20830 Figure 4, **NOT SAME**, Zint uses mask 11 instead of 10 (note figure includes alternating filler)",
  670. "11111110000101001111111"
  671. "10000000001000100000001"
  672. "10111110110001001111101"
  673. "10100000100100000000101"
  674. "10101110110011001110101"
  675. "10101110111101101110101"
  676. "10101110101100101110101"
  677. "00000000011001100000000"
  678. "00010101110110000000000"
  679. "01010010101111101111001"
  680. "11110010001011001101110"
  681. "01010110010010010011001"
  682. "11110011100000000111000"
  683. "11100110010101000010101"
  684. "00000000010010110101000"
  685. "00000000110011000000000"
  686. "11111110111011101110101"
  687. "00000010101101101110101"
  688. "11111010001100101110101"
  689. "00001010011111100000101"
  690. "11101010011010101111101"
  691. "11101010111010000000001"
  692. "11101010011010001111111"
  693. },
  694. /* 10*/ { UNICODE_MODE, -1, -1, -1, 3 << 8, "汉信码标准", -1, ZINT_WARN_NONCOMPLIANT, 23, 23, "ISO 20830 Figure 4, explicit mask 10, same except no alternating filler",
  695. "11111110100001101111111"
  696. "10000000101011100000001"
  697. "10111110101110001111101"
  698. "10100000010101100000101"
  699. "10101110001111001110101"
  700. "10101110000101101110101"
  701. "10101110111100101110101"
  702. "00000000011010100000000"
  703. "00010101101110111000000"
  704. "00000001111110011110111"
  705. "01001100110000101110001"
  706. "01101100000010101011110"
  707. "11111111000111110110110"
  708. "00000101011100100001001"
  709. "00000011111111110101000"
  710. "00000000101000000000000"
  711. "11111110101101101110101"
  712. "00000010111111001110101"
  713. "11111010001000001110101"
  714. "00001010110110000000101"
  715. "11101010010111101111101"
  716. "11101010101001100000001"
  717. "11101010100100101111111"
  718. },
  719. /* 11*/ { UNICODE_MODE | ESCAPE_MODE, -1, -1, 4, -1, "汉信码标准\015\012中国物品编码中心", -1, ZINT_WARN_NONCOMPLIANT, 29, 29, "ISO 20830 Figure 5, **NOT SAME** Zint uses mask 00 instead of 10",
  720. "11111110001000100011001111111"
  721. "10000000101000001110100000001"
  722. "10111110111111111110101111101"
  723. "10100000011100001100000000101"
  724. "10101110010110001010101110101"
  725. "10101110001000110000001110101"
  726. "10101110000000111110001110101"
  727. "00000000001111101010100000000"
  728. "00011000111111000111101000000"
  729. "10100000000011001000010001100"
  730. "11111011000000000010011011100"
  731. "11100101001011111011011101000"
  732. "10001010100000101000110110100"
  733. "10100111111010100000111111100"
  734. "11111111111111101101110001101"
  735. "00000000000000101101100111000"
  736. "11101101001010110011111111101"
  737. "10111010110010100001000011110"
  738. "01001101110110110110000000001"
  739. "11111000001000101111010001111"
  740. "00000010110010101101100011000"
  741. "00000000100100110111000000000"
  742. "11111110011000110010001110101"
  743. "00000010011000100000001110101"
  744. "11111010101010111111001110101"
  745. "00001010000110111110000000101"
  746. "11101010100000110101101111101"
  747. "11101010101110110000100000001"
  748. "11101010000000111111001111111"
  749. },
  750. /* 12*/ { UNICODE_MODE | ESCAPE_MODE, -1, -1, 4, 3 << 8, "汉信码标准\015\012中国物品编码中心", -1, ZINT_WARN_NONCOMPLIANT, 29, 29, "ISO 20830 Figure 5, explicit mask 10, same except no alternating filler",
  751. "11111110100000101010001111111"
  752. "10000000001100001010000000001"
  753. "10111110100000000001001111101"
  754. "10100000010101000101000000101"
  755. "10101110110010101110101110101"
  756. "10101110010111001111101110101"
  757. "10101110101001110111101110101"
  758. "00000000001011001110000000000"
  759. "00011000100000111000011000000"
  760. "11101001001010000001011000101"
  761. "11011111100100100110111111000"
  762. "10011010110100000100100010111"
  763. "11000011101001100001111111101"
  764. "10000011011110000100011011000"
  765. "11111111111111110010001110001"
  766. "00000000000000100100101110000"
  767. "11001001101110110111011011001"
  768. "01000101001100111110111100001"
  769. "00000100111110111111001001000"
  770. "11011100101100101011110101011"
  771. "00000011001100110010100011000"
  772. "00000000001100111110000000000"
  773. "11111110111100110110101110101"
  774. "00000010100110111111001110101"
  775. "11111010100010110110101110101"
  776. "00001010000010111010000000101"
  777. "11101010011110101010101111101"
  778. "11101010000110111001000000001"
  779. "11101010000100111111101111111"
  780. },
  781. /* 13*/ { UNICODE_MODE | ESCAPE_MODE, -1, -1, 24, -1, "汉信码标准\015\012中国物品编码中心\015\012北京网路畅想科技发展有限公司\015\012张成海、赵楠、黄燕滨、罗秋科、王毅、张铎、王越\015\012施煜、边峥、修兴强\015\012汉信码标准\015\012中国物品编码中心\015\012北京网路畅想科技发展有限公司", -1, ZINT_WARN_NONCOMPLIANT, 69, 69, "ISO 20830 Figure 6 **NOT SAME** different encodation, Binary mode not used by figure",
  782. "111111100000101101011111111111111111111001001110010100100010001111111"
  783. "100000001100110100000000000000000010111100110000010001110101000000001"
  784. "101111100111100011100101000110011011011110011110101101001000101111101"
  785. "101000000010000111011010000110111010111100100011111100110000000000101"
  786. "101011100000010010000110101000000011011100101011011111000111101110101"
  787. "101011101101000100011000101010101011000000111001000110111100101110101"
  788. "101011100010010010100011101010101010101010101010101010101010101110101"
  789. "000000001110010000011101101011000011001011100111111010101010000000000"
  790. "001011001010010010110100001010101011100110101000001010011011011000000"
  791. "110101110101111001111100010010001010101010111011111111010100011010101"
  792. "101101010101001001011100011011101010100011111000010100101101111011010"
  793. "100101101010101100010100110001110010111010001001010101010101010101010"
  794. "101010101000010100100100001011100011111110000101111011010000010011110"
  795. "111110111100111000111001011101101011111001011111000111101100011101101"
  796. "110010010110011111011010111110110010110010100010100110110101001010101"
  797. "100111110010001001001110110110110010000011110011010011011101110001110"
  798. "110000111000010110101010101010101010101010101010101011101100011110100"
  799. "111111111111111111100101110001010011111111111111111111010100110100001"
  800. "000000000000000001011011110011000000000000000000000110101001101000100"
  801. "101010000010010001000000101101000011011110101100110111010101010110110"
  802. "111000101001110101011100101110011100011100001001100101000011010110110"
  803. "011001010011101101111111101011000111010001100010000111111110011110011"
  804. "011010101010101001101010101010101010010011001110110101111011100000101"
  805. "001111110001111101100000101001100010011110010011110110100000110010000"
  806. "011000111100011101000000100010001011111101001110010111001100101001110"
  807. "010011110011010101111111110000010010110000111100110111000100111001100"
  808. "001010001110010101010000110111001011111001000010100110101010101010101"
  809. "010101010000001101000101000000000110111100101101000100101011111000110"
  810. "010100111011001001000010110111110010110101010100110100100000110011110"
  811. "000110111011111001100011001111011111100010110110000101101111111010000"
  812. "011010100001110001000111001000110110100111011010000101000101010010111"
  813. "001111101110101101110101010101010101010101011010100101111100111001111"
  814. "110001001111100101100010010001100011001111010010110110101101100011011"
  815. "000000000010011001001101010111001111101010011001110111100101110111100"
  816. "100010010011001001111111111111111111001000001100000111111111111111111"
  817. "001000110111000000000000000000000011011111000001010000000000000000001"
  818. "110110010101010011111001111011110011101011000100100110001101110000101"
  819. "110101010101010101010101100011111011001011101100111000100010110010001"
  820. "101111101000111110110100000000110011010100001101101010000000100100101"
  821. "110010101010100000110111010011100010000001100010101010101001001100101"
  822. "110100011010011000111011011010001010000001101001110000110001100001001"
  823. "110001011100001010100111101010100011101001010101010101010101010100101"
  824. "110101011110111110001010111011000011010101100010001111110111101001101"
  825. "101000001011000111011000011101101010101011110100100110110000001011101"
  826. "100000010000100111110110101100010011001010101100001111011010010000001"
  827. "111011110101110011110111111110111010101001110101101001100000001100101"
  828. "100111001001110010101010101010101010101011010011110101001001000011101"
  829. "101010001010111111100110000011010010011110101111001010010110110110101"
  830. "100101110111011101100110100001011011110010110001001101000111100001101"
  831. "100100101100100101111001011110101011010110010010101000001010110011101"
  832. "110010011100000000100100000110100010001010101011010100110010101010100"
  833. "111111111111111111010101010101011011111111111111111110100101000000001"
  834. "000000000000000001010000101001010000000000000000000101001000011110100"
  835. "100000111111111001111001000110000111111100101111010101111001000000010"
  836. "111000010111010101100110111110100001011110111111110101101011111010011"
  837. "101100001011101001000000110010011011101100010010000111000101011011010"
  838. "000100001101010001011010011111111010101010101010100110101011000011111"
  839. "001001100001111001101010110100010111101000100001000100100100000000111"
  840. "010100001000010101100010001011111010100100100111010111110110001101101"
  841. "100000111101011001000100010101101000111111000001010111101110100001001"
  842. "000000110100111101010001011011001110111111010011000110000101100110100"
  843. "000000000010111101100011010101010101010101010101010101010000100000000"
  844. "111111101101011001111010100000101000010101101111010100100100001110101"
  845. "000000101101001001101001011100101111001111000000110101010100101110101"
  846. "111110101101011001010101110100100010110111111100110111110101001110101"
  847. "000010100111111001000111110110011100010110001010110110001110000000101"
  848. "111010101001001001100110011111011101010101011011100101100011001111101"
  849. "111010100100111101001001010101011000001101010101010101010101100000001"
  850. "111010100010101001111111111111111010101010101010100111111111001111111"
  851. },
  852. /* 14*/ { UNICODE_MODE | ESCAPE_MODE, -1, -1, 40, -1, "本标准规定了一种矩阵式二维条码——汉信码的码制以及编译码方法。本标准中对汉信码的码图方案、信息编码方法、纠错编译码算法、信息排布方法、参考译码算法等内容进行了详细的描述,汉信码可高效表示《GB 18030—2000 信息技术 信息交换用汉字编码字符集基本集的扩充》中的汉字信息,并具有数据容量大、抗畸变和抗污损能力强、外观美观等特点,适合于在我国各行业的广泛应用。 测试文本,测试人:施煜,边峥,修兴强,袁娲,测试目的:汉字表示,测试版本:40\015\012", -1, ZINT_WARN_NONCOMPLIANT, 101, 101, "ISO 20830 Figure 7 **NOT SAME** different encodation, Binary mode not used by figure",
  853. "11111110111111111111100010101000011101101011111111111111111110101100101110110110101100011000101111111"
  854. "10000000100000000000100101011001001001000000000000000000000011000001111101100010001100010100100000001"
  855. "10111110110100010100111000101101010111011101101110011000011010100101110001010110001001010010101111101"
  856. "10100000001101100000101100010000001100000111000000110110000010101010000000010011001110101110000000101"
  857. "10101110000010000100110111111001010010101001000110010010000011110001011010010101110001001010001110101"
  858. "10101110110111101000100011100000001010010101101010001101001010001111001000100001101111110110001110101"
  859. "10101110000101010100110000111111110101101010110101000111100010110010010001000101111001110011101110101"
  860. "00000000111000000000110111110101101001111101010101101011010011000100101100101111000110010101100000000"
  861. "00111100101010101010101010101010101010101010101010101010101010101010101010101010101010101010101000000"
  862. "01010101010101010100110101010101010101101000101110100000110011000101101010000010101111010100000100001"
  863. "10001101000100110010100010000000110000011011010011011001011011000011100100000110110001111011001100000"
  864. "00111110111011110000101011100010001000000000110110111110110010101010110110011011010111100010111110100"
  865. "10110100100100001000101010100010011011001001110000100101100010010010111001100000000101111110001101010"
  866. "00101001001110010010111000011010010010000111100111111010101010100110010011000000000010111010100101010"
  867. "01000001111100001100110101000100110000011010001111010010000011001110001111100101001010101000111101010"
  868. "10001100100111010100110101010101010101010101010101010101010011010101010101010101010101010101010101010"
  869. "10101010101010101010101010101010101010101000000010001100100011001101000100110100110111010100110110000"
  870. "11000011000101101010110101100010101110001010010000010001010010000110001101100010010011000000011100010"
  871. "10001110110000110000110011011101001110011000000100100011111011100110101011001001011010011010001111010"
  872. "00010000101111000010100111011000110001001101101101001011000010011110100111010010011010000011101111100"
  873. "10101110000101100110111111111111111111111101001101100111110011111111111111111111100111100011010100101"
  874. "00101010011010110110000000000000000000001010111110101100100000000000000000000000101000110011111110100"
  875. "10101110110111011101011010011110011001101001011101000111010000010010000000101010101010110011100011001"
  876. "11000010111101010101010101010101010101001101010101010101010101010101010101010100110101010101010101010"
  877. "10101010101010101010101010101010101001001101111111101110011000011100011101100010101110000001011110011"
  878. "10110101101101100001000101101010000111001000111110001001111011011011001001110110110111011110110000110"
  879. "10011000101110001110101100001001010101101111011011001001101110101100101001101100111010001101111001100"
  880. "11111101001010110010101100010011011100101011110000000100011110000000110100011110101101001110100011000"
  881. "11000101101000000100001011011011100010101001001110111000111011011001010110111100110111010110100011011"
  882. "10001000111011101111000011010111000100101110010011111101001000011111101010000010110010010101010001000"
  883. "10101011000010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101"
  884. "11010101010101010101010101010101010101001101011000111100000110000000001111101100101011001110110010100"
  885. "10101011101111001011011110101101110111001101100110110100001111101110101101111110110001110111100110100"
  886. "11010100100011011110011110001001110001101110101101100101011101001100010001001100111001010000001100000"
  887. "10000101111110100100111001000011001010101011011110100011110101111001001000011100110000101111100000000"
  888. "10101100011100000011110110100100110010001000110111001111001101010010101000010000101010011000001010100"
  889. "11000010110000110100101001000111101100001110000101011011101100100000010111100000111000110001000010101"
  890. "11001010101000001011010101010101010101001101010101010101010101010101010101010100110101010101010101010"
  891. "10101010101010101010101010101010101010101010101010101011011000100111010010001000111010000001110110111"
  892. "11101000101111001100000110110001111101001111000100010101000110111110011110100100111011010011101111010"
  893. "11111111111111111111111011001111100000001111111111111111111110100100001011010010111111111111111111111"
  894. "00000000000000000000100011011101011101000000000000000000000010000001111111100010000000000000000000001"
  895. "10000010111011101010101101110110011000111010110000111111110010000111100111000010110001111100001001101"
  896. "01100101110100000100111010010111100100001100010000000110111011000110110001001111001111010110011011001"
  897. "00111011010111010010111011010010011101101001100101010111110010110100111011010101011111101100110011101"
  898. "11001100100111001000100110101011010101011111011001101111010011010101010101010101010101010101010101001"
  899. "10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010011000101"
  900. "01001011101100110110100100100111010011110001010000101110001010011001110011010010111000111000111110001"
  901. "10101110100110001110101010011100000000001101101100001101110010010100110010110001010100110100000000101"
  902. "11011111111111010100111101011101001000101011010000110001111010000110011011010010001011001000111001101"
  903. "11110000100101011000111001010111111101010000000001101011011010000011010101100111101010001100001011101"
  904. "00100000000011000100100011001100100000110011001011011010011011101111001111011001100110001000110000001"
  905. "01110111000011111000111101001000000111101000011010101011101011111111010110101010101010101010101010101"
  906. "01010101010101010100110101010101010101010101010101010101010011010101010101010101010101010101010101001"
  907. "10101010010001010100100111010110010010011100010010001010001010101110100011011101001011001110011110001"
  908. "01111000100110000100111111111110000110111101001110011100111010110110110011001011100101101010101010001"
  909. "10110101000000110000100111000010111011001010100110111101010011001100010110001011011000000100000101001"
  910. "11010010110011010000110011100110100111010001010111000001100010111100011100010100101111100111001010101"
  911. "00001101111011101010101011011011111110110010100110000001110011010111111110110100110001011101110011001"
  912. "00111101010000110000110010100010100010011001001001101100101010101101010100100101010000011101010101000"
  913. "10101010101010101010111111111111111111111010101010101010101011111111111111111111101010101010101010101"
  914. "00010101010101010100000000000000000000001101010101010101010000000000000000000000110101010101010101000"
  915. "10101010101010011001101111100110100010001110110001101001011001110010101001111010101110110101110001010"
  916. "10101010011001000000011000110011000100101100110110110000010000001110000110011000111000010110100110000"
  917. "10000001000100111010001011110110101001101001001010010110010011101100101000011100110001001110000111101"
  918. "11110011000000111100111010101100001010001011010001011011011000010011000110111110110101011010101100111"
  919. "10110011011001100100111000100000010111101010000111101110001010110100101101000000111011001010110111010"
  920. "11010010001011100100110011101010010110001111101000110100100111010101010011001010101010011101010101010"
  921. "10101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101"
  922. "11010101010101010101000100110001011010101101111100001010101001100011100011100110101101100100011001111"
  923. "11100010010111111100110110111100101111101100001001100111111101110100000001111110110110011111011111100"
  924. "11111101011011001011001100011111110101001010110101100100000000110110010000111100110110000100001101101"
  925. "10111101111101010000110000000011101010001010110000111010010001110101101010100000111011000110000001010"
  926. "10010010100110000101100001100110001101101000101101001010111000001001110000110010110100000011010100100"
  927. "11101011110011011110010100011101110111001101110010001100101000101110101010101010101000101100000110101"
  928. "11010101010101010101010101010101010101001101010101010101010101010101010101010100110101010101010101010"
  929. "10101010101010101010101010101110000111101011001101000011001110000111011011100110110010101001110110010"
  930. "11001110100110110000010111000001100110001111110001100010100110010000011001110100110011010000010001000"
  931. "11111000010110000000100001110011110101001000011111000100100110011101111011000000100111101001001010111"
  932. "11010001101111101100110100000101110101101010110011101011100100100001111010000010110100011110110010001"
  933. "11111111111111111111100111100010101011001111111111111111111110111011101101001010111111111111111111111"
  934. "00000000000000000000101011111010011010100000000000000000000011000100111100000110000000000000000000001"
  935. "01011000001111110000100000011001011101000111001010001010010010110100011010011101111110010100100110101"
  936. "10101101010101010010111101011001010101010101010101010101010011010101010101010101010101010101010101001"
  937. "10101010101010101010101010101010101010101010101010101010101010101001001000001110111010111100000011101"
  938. "10001001000111000110101101100100001101111110100001000110100010001000100000110011100100000110000100001"
  939. "00110100100101011010101011011010001111001011011100011011000011001110101100010010111100110010001100101"
  940. "00111110011110110110100100010001011100001001010001111011110010100010111010000011011101000111110000101"
  941. "00101110111011010100110001101011010011001010010100011101000011001000100011010110000111010011010011101"
  942. "00000011000110101010101010101011000000100100001101100001101010111110001111010001001010101001010101101"
  943. "00111001011010110000101010101010101010100011101010101010101010101010101010101010101010101010101010101"
  944. "01010101010101010100110101010101010101010101010101010101010011010101010101010101000111111011110011001"
  945. "00000010100000010010100110100110011011111010001111111101111011010111011111110100111010101000100111100"
  946. "00000000110000000000110101001111001001011111000010100110001010111011110011000101000111001110100000000"
  947. "11111110110001100000111101111110000101000111011100100000101010000000101111110101100100111001001110101"
  948. "00000010010110100000100110100110110000110110001111010110010011111001000101101100000100010110101110101"
  949. "11111010011011110010111110110000100000100011011101001001010011101011101010010010000110011011001110101"
  950. "00001010010011110110100011000110111000001010001000101000111011001010101011001010011100100110000000101"
  951. "11101010110101101110111110000011000100000000010101111110111010011111011110101010101010101010101111101"
  952. "11101010110101010100110101010101010101000001010101010101010011010101010101010100000101010101100000001"
  953. "11101010101010101010111111111111111111101010101010101010101011111111111111111110101010101010101111111"
  954. },
  955. /* 15*/ { UNICODE_MODE | ESCAPE_MODE, -1, -1, 62, -1, "本标准规定了一种矩阵式二维条码——汉信码的码制以及编译码方法。本标准中对汉信码的码图方案、信息编码方法、纠错编译码算法、信息排布方法、参考译码算法等内容进行了详细的描述,汉信码可高效表示《GB 18030—2000 信息技术 信息交换用汉字编码字符集基本集的扩充》中的汉字信息,并具有数据容量大、抗畸变和抗污损能力强、外观美观等特点,适合于在我国各行业的广泛应用。 测试文本,测试人:施煜,边峥,修兴强,袁娲,测试目的:汉字表示,测试版本:40\015\012本标准规定了一种矩阵式二维条码——汉信码的码制以及编译码方法。本标准中对汉信码的码图方案、信息编码方法、纠错编译码算法、信息排布方法、参考译码算法等内容进行了详细的描述,汉信码可高效表示《GB 18030—2000 信息技术 信息交换用汉字编码字符集基本集的扩充》中的汉字信息,并具有数据容量大、抗畸变和抗污损能力强、外观美观等特点,适合于在我国各行业的广泛应用。 测试文本,测试人:施煜,边峥,修兴强,袁娲,测试目的:汉字表示,测试版本:40\015\012本标准规定了一种矩阵式二维条码——汉信码的码制以及编译码方法。本标准中对汉信码的码图方案、信息编码方法、纠错编译码算法RS、信息排布方法、参考译码算法等内容进行了详细的描述,汉信码可高效表示《GB 18030—2000 信息技术 122", -1, ZINT_WARN_NONCOMPLIANT, 145, 145, "ISO 20830 Figure 8 **NOT SAME** different encodation, Binary mode not used by figure",
  956. "1111111000001010101011111111111111111000011101101011001011111111111111111010111011011001101011111111111111111100111110101001101010010010101111111"
  957. "1000000001000001100000000000000000001111011000100111000000000000000000001101101011101010000000000000000000001111010010101000100011101101000000001"
  958. "1011111001100110000110100101110001001101100010010100100110110000011000101000000110000011100000011011000001001101000000001001100111010111101111101"
  959. "1010000000000100001010111111001010001101010010001100100100001110001011001100101011100010010101011110100000101110000000101001010110101000000000101"
  960. "1010111001101001000111100100010000101101111110110001010101010000111111101101011010101101010001111000110010001100010001011110011100111100101110101"
  961. "1010111010000001011111010110100111101101010101101011110110101000101001101110001000100010010111010101011001101100001110010000001010000011001110101"
  962. "1010111000011001100010111101000001101010011111100001001000001101111111101100101000000000001110110111100100001011111010000101101111100110101110101"
  963. "0000000010111000010011011110110111101000000101111010001010111101010001101110111100110110011110111110011101101001110000101101101010110001100000000"
  964. "0101001011111011001010111001100111101011011111100001011100100110011100101111110010100000110000111100101111101011111100000110010010100010100000000"
  965. "1101101100001100000110111000011010101101111101010000101101000000111100001110110110101010101000111010001010101010110011110100111010101101010010001"
  966. "1010110100111000011010100110000000101001101001100000101010000110000000001001111001010001010010011011111000001101010000111110011011101010100110011"
  967. "1100001100110110101100111010011000101000011001101000011100011010011001101100010000010101000000001000011110001101010101010101010101010101010101010"
  968. "1010101010101010101011010001011101001000011010001011010100000101011110101010000010000110001101000100110010001010000000110000011011010011011001011"
  969. "1011110001101111100100111000010011001011111110000010001000011110100011101011101111111110010010000010011010101010010011001001010000111010000010110"
  970. "1011010010010000100010101000100110101100100111000010010110000100101110001110000000010111111000110101000101001010011100100111000011010010010000111"
  971. "1011000000101010101100110110011111101111101000101011010101101111100000101111001010101110110011111001011100001010110111101100011100000110101101011"
  972. "1101001111110111001101000011011101101110110101011101101000011110011001001101011010111110011001000111110000001100000001110111111001100101111101111"
  973. "1100110010100100001010111100111110001010000100000010111001111100000011101101101010101000000111000101011100101010011111101111011011010011000110100"
  974. "1111111111111111111001101110111101101111111111111111111100111001001010101111111111111111111111011101000011001111111111111111111101011000101001101"
  975. "0000000000000000001111100110000010100000000000000000001110111011111110100000000000000000001101010101101100000000000000000000001000110010001111100"
  976. "0100110001110100001101110110100101100000011011011010001110000111001100011100100011010110001001100011010010100001111100000110001110101010010011001"
  977. "1011001001100111101100111010110110011101001011000000001010010111110101110111110011000000001101010101000100101111011111000110101111010000110011100"
  978. "0110110101100100001000011101111000000010011000001000001011100100001001101010110111110111001010110111101110001111011101111000101010101001101111101"
  979. "0010000101010101001101010101010101010101010101010101001101010101010101111111011100110110101100101110110010110010001010110010001111100111100111010"
  980. "0101001010011101001100011101011011111011101011111001101100100111011011001111111000111010101110001001111001110110010001011000101100111111011011100"
  981. "0000011001010100101101101001011001011100001011011110101000011110110001001110011101100100101001011010011111000010110001011011001010111110001000000"
  982. "1000111101001100001101100100110000011100001110010101101001010110010100100101000001010011001111011100110000000100101110110111001111010110100111100"
  983. "1100110010111010001011101000001001000000010100110100001110111010100011111100100010011001001110100010001010011000100000111001101110111010100010110"
  984. "1011000101011101001101001000110100000110110011110101001111101011001100100010111011011011101101100111010101000011001111110110101101011001101100001"
  985. "1010011001100110101001111001101010010111100101000100101000110100101101000000000010000101101110110011111011101000110000101111101110010101010011100"
  986. "0100110111001100101010110101001101011101000101110100101111001001000101010001110101011101001110110101010100010111110111010011101100001100100001001"
  987. "1000100000100110101010011011100101001101110101110000101110010011001001010001101000111011001011100000100001110101000110011010101110011101101111000"
  988. "1111100110010001101100101011111110011110010100001010001010001101100001100100011101100100001011110010100110011111111001011010101010111010001001000"
  989. "0001001111001101001100010101011010011011100000010101001101010101010101010101010101010101001101010101010101001010111111110111001011000011100011101"
  990. "1000101110000001001111100111001010010010011110111010001101011110001111000001110110000100101001001101100010001000100001001111001010011000101110001"
  991. "0011010110000100101010101111101101100100110111010110001101001101101101000110111100110000001001011010100110101001110110010001101010000111111101110"
  992. "1000011111110010101111111111111111111110000100101100001111111111111111111101110011110001001111111111111111111110100000010000101111111111111111111"
  993. "0001101101110001000000000000000000001100100111011100000000000000000000001111011011001010100000000000000000001101111010111010100000000000000000001"
  994. "1010111001000001000111011101111000001110101110001001110010011111101001001000111111010100000110010011100101001000111000010101111110000111110111101"
  995. "1111011100100010010110000101010110101000111100111110001010011100101000101000011010001101110010100111001001001101111110000011001111101101001010101"
  996. "1100101000100101100011101010101001101101101010111111100100110111101000001001100110000101101110110010001110101110110000001100101010000100011001101"
  997. "1000001110010100010101100101001001001111100000110000001111011101111001101001011100011000001001110001101011101101011110111110100010010011001101101"
  998. "1011000101011111001111111010010010001100010101010000101101000101001111101010111011100000111111000001100011001010000010010000111101000101010000001"
  999. "1011011001100111101110101110100100001011011110010110110011101101111110001111001100001101001101111011110101001101010010011000100010011011101011101"
  1000. "1001010111001001001011010101001001101011011001101010101101100101001011101100101011001001010110100101011010101010101010101010101010101010101010101"
  1001. "1101010101010101010101001110000111101100111111111000001001101001100010001110101101010111011110010110111101001110111011101011001101101000011111001"
  1002. "1000101001000000011100010000110010101110101001000110111100111100010011101000111101011011001010111010011000101000100110110010100000011000001111001"
  1003. "1011111101001001110010000110010101001110111101000111101011110010010000101110100001011111000000001010011100001111111000010010110110011011111001001"
  1004. "1110011110011010100101010000100001001100110000010101000111101001111001001110101101110000100111001111010100101000100110111111010000111100111001101"
  1005. "1010001001100011111100111100111111101110011100100010111001000000011011001010100011000100111100000110011101001011100100110011010010101111110100001"
  1006. "1111110101111110110101100010110111001101011110110011011001011000010101001010001001011001100010111010101110001011011010110000000001011111101011101"
  1007. "1100101001101001110101110000001110101001001110110011011100000000111111001110011111110001110000000101110000001010010001001010111001100110111101001"
  1008. "1010111100011101010100100001011001001101011111010011010000001101001001101111011101101011010101011101101000001001110011011010111010111010101111101"
  1009. "1111110110001100000000110001011111101110101010100011001000010001110011001111101101101011000111100110001100001101000000000000110110011100101101000"
  1010. "1111111111111111111000000111110101001111111111111111111000100001000101101111111111111111111011001100110000001111111111111111111100011111110001001"
  1011. "0000000000000000001000101101000111000000000000000000001010010111001111000000000000000000001111001011111101000000000000000000001001000101001100000"
  1012. "0101001101110011001011101010101010101010101010101010101010101010101010101010101010110110001010011101001000100110100000011101101011100101110100001"
  1013. "1001111100100111001000010100011101110101011100100000101100001011010010010110001000010111001110011111000000010010000101101001101110010001010001011"
  1014. "1111100000000111001011111010001000101010010001001100101110001010011110000000011111000011001001111010011100000111101100100110101000101111101001011"
  1015. "0100001101111001101101111111001000011100100111011000001110000101001100100111000100101000101011000100101101100010010110011010101010000011001011000"
  1016. "1001010101000000101001100110000011001101100011011110001101010111100101101010001101110001001111011011110100010011011011100001001110100000111001010"
  1017. "0001001110001001001011010000101101100011010011011000001010111000010110110111100001111011101011111011111010110110111101001101101111111000111000000"
  1018. "0100001000111110101000011111101100000011110110001110101010010010110001011101000101001101001000111011011000000111100111100101101101111100111110101"
  1019. "0001110100011111001001100011010111010100000001101010101100010111000110000010101010001100101111111110010100011010100101001001101101011000000001011"
  1020. "0100011111111100101110111010101101110100100011100110101110100110100111010101101111011111101101101110111111010011100111010111101110011010011101010"
  1021. "1111010010111010101111010110011000010001101111001100101001111111111010111110100100111011001011010001110101100000100010011000101001000001101111100"
  1022. "0011001010001000101000110000111010011101011011010001101010010110101010101010101010101010101010101010101010101010101010101011001011101011010001001"
  1023. "1001001101101100001101100001110101111010001110110011001001100101101000111000111000001101001100010110011100010101100011111111101100100100111100100"
  1024. "0111010110011010001111010101100101111111100010000000001000101010001010001011011101010010101111001110000111100110010010110111001100110111000110000"
  1025. "0011110110101001101001101010000000101011111111100101001010011111001010100110000101011100101111010001101111111110011101111001101001101111100110011"
  1026. "0100100101100001001000110000100110011001110111001111101100010001111000001100010110111111001000101111001110011010001110010010001100001000010100101"
  1027. "0011100111010100101101101110101001101010000111101010001101101101010110101010111010011101101101101110000110100101111100111001101011100000111000011"
  1028. "1001001110110011001111111111111111111011111111001011101111111111111111111000100110111011101111111111111111111111011010100010101111111111111111111"
  1029. "0001110110010100000000000000000000001100111011110000000000000000000000001010010000000100100000000000000000001001001001011110100000000000000000001"
  1030. "1010110101110010111001101011001100101011111100000111001101111101000000101000100011010110001001011100001001001011001011000010111110000101010101001"
  1031. "1110011010111000000100110011011001101001001011100110100010011011000001101110100110001110110100110001111000101100001100000010111100000001100111101"
  1032. "1100000100011110111100111101100100101101000000110010101001101110001101101011001101101100000110111001000101001101010010001111111100110111110000001"
  1033. "1101011100000110011101101010010000001101111110010111001110011101010011101101010110001001111011010101011011001001011011110101010101010101010101001"
  1034. "1010101010101010101010101010101010101001000101010001110101100100100111001001001000101000101011101000110111001100101100111001111000111100010011001"
  1035. "1111010000000000111100100001011000101100011000100100100110011010001101001010101010101101001010111111001111101000111101000100110101011001000010101"
  1036. "1101001100010110001011011000000100001001010110100101100110100010011100101101001110100010101110000011000111101000111000101001011111001110010101001"
  1037. "1111001000010001010101001001000000001100110101100111111000101010000000001100101100111010001000110010000101001111100111011010111010111011001101101"
  1038. "1100110110010101011110110101011100101111101010011111001001110000100011101100100100101101110001111101110110101011010110000111001110110000101000001"
  1039. "1101000110111010110010001100000000101110110010011001100100100110011110001101101011011111010101000010000101001110000111010100100101010110111010101"
  1040. "1001000110000110010100001001000101101000101000011000001110011111011011001101011111101100110000111101001000001100100100111011010111111010010000101"
  1041. "1010000100010101110011011111010001101100100101101011101010111101000011101100101000011010100100000110110110101010001100110101001110000100001010101"
  1042. "1110010111110111110010111010001100101101100000100010110100000111011010001111110000000101100010110101001010101110110001110101001110101000110000001"
  1043. "1110010111100111000011011111101000001110010101111001000111110010011010001101011110101100100110110001111100101111110011000110000010111100001010001"
  1044. "1110101010000111010001001110101010101010101010101010101010101010101010101010101010101011001100100000110010101110110010011100101101001100011010101"
  1045. "1100111101011101101011100010101010101011001101111111001110011001110110001110010010011111011111100011110011001011001111010010110011110000001000100"
  1046. "1111111111111111111110001011101000001111111111111111111100101011001101101111111111111111111010110100110110001111111111111111111010011010111100001"
  1047. "0000000000000000001010001001110000100000000000000000001111010001100111100000000000000000001110000110001010100000000000000000001001111010111001000"
  1048. "1110100100100111101011001110010000001010100101010011001000110011011001100100111000100000001101111010000111101110001010110100101011010000011011001"
  1049. "0101101110100101101011101000110110011000101011010011001000101110010110110001001110010011101100001110100101000010011001001011101101010001011011101"
  1050. "1001000111100100101100110100010011001110001101010010001110111101100001010010111100111000001111101100110000111000001000100110101101110111101101001"
  1051. "0100000010110101001001100101100111110111010101100001101110100111001010001100100101111101001100110001000010011001000000101111001000010101011010000"
  1052. "1001110100101101001000100101100100011111100101100000101000110100011111110011010011001100101101010001110101110100000110001000001011101100011110111"
  1053. "1110100101110011001011110011010101001001000011101010001111110001011001011010110011110101001001111100111010101100010111001011101010111011101101001"
  1054. "0110000111000110001110010111001111000001000101010101101000011001110001001011000001111101001000001011111000111001000100110111001001000010011100010"
  1055. "1101001101110010101111010000000010100010111001000000101111010011100111111100010101010101001101010101010101010101010101010101001101010101011101100"
  1056. "1110100101001000001011110101010110011100011100011001001010011011100110000110001001011111101100110110111100101111110000100110001111111101110100000"
  1057. "0011111110110011101110111111000000010100100110100110001111000000010101101001010011011111101110010011011110000101001111011110001100100111101111101"
  1058. "0100001100000000101110101000101100001110100100011101001110101010000110110001100000010101101011010110011110100111100110011100101001110100101101010"
  1059. "0011111011000111101001100101111110010101101111010111101001101111001010001110111011101011101001000110010100010111010110000100101010101100100011011"
  1060. "1011001101010111001101111100110110011010011101011000101000011110010000000110101101001101001100000001101100110011111001000111001010011100010011100"
  1061. "1010011100001111001110101100100111001110110101100101001011010110110101100011011001010111001011001101111110011001101100100000001110100110101010101"
  1062. "1011011110101011001010000000110000101000101011000011101001000100110001100101010001010001101111010001001001001100000001101110101011001010110010000"
  1063. "0011010000011011001100001010000010010011110000101111101110101000101010100001001010011111101101000111101000101000111110000111101100010010110011101"
  1064. "1010110100100001001111111111111111111011000000100101101111111111111111111010010010111110001111111111111111111111110011110100101111111111111111111"
  1065. "0000001101100100100000000000000000001101001110010110100000000000000000001101110110101011100000000000000000001011011010010110000000000000000000001"
  1066. "1101110011101110011010111000100010001001010011000111011001100010011011101110100111110100011011110101001111101010100110100101101110101010101010101"
  1067. "1101010101010101010101010101010101001101010101011100001111011001101000001110011100001110110111001110010101001011101100100110001011001001111101001"
  1068. "1110000011001100111110001100010100101100100000110011101010011010000010001010000000111101001111111011110001101000010101111100000111011011001100001"
  1069. "1011110110000000111101001001010111001101110010000010011001011111010001001100101001100010100011011011110000101011111001011100001001101110001111001"
  1070. "1110101010011000100010010110100101101111010011010110001001111000001101001110000011111100000000011001011101001001110010100010100100110100011010001"
  1071. "1000100000011010110110010010101100001111111000011100000000110100110001101000001100110000101001100001001111101010011110101100110101110111010111101"
  1072. "1011001001000001110110110010000101001011010100010111111010100110011011101100011101001000011111001000011100101111111110101001110110011001011010101"
  1073. "1110000000010011000100001111100011101011001100010010101001111000001011101001011100110011001100110011110100101001111111100010000101100111010000101"
  1074. "1011101011001100011001010101101000101000100100110101110010111110000110001011001011101101000010010111010100001011111101110111111111011001010011001"
  1075. "1111110101011010000000001001011011001001001110010100110100001101001110101001001100111101100010100111001010101110010111010111010001010111001010101"
  1076. "1110001010111011100101111001000000101101100010000111010001010111001001001110110001000000011111000001110010001110101001010101111110110101101101001"
  1077. "1010101011001101010000000011100101001101010101010101010101010101010101001101010101010101010101010110110111101100010001010000111111000011101101101"
  1078. "1011100011011011001000011011111101001000100011010000010001000001100111001010000011000010000011010010010101101010101101101000111100101101110001101"
  1079. "1100111011000101001110110100001100101101110011011000001100001001001101101101110100011110110101110000100001101011101000101111100100010111000001101"
  1080. "1001001011101110110101010001101011001100110010100101000111010001001000101000110101100001110100110100111000001001100011010101010101010110000001001"
  1081. "1101111001001111001010000011100001001111011010101011010101001100011010001101001111100010010110111001101111101010000010101001011000000101111110000"
  1082. "1111111111111111111001101100110010001111111111111111111010100101101011101111111111111111111111111111111101001111111111111111111100110111011001101"
  1083. "0000000000000000001000011110001001000000000000000000001011100001010000000000000000000000001011010111000011000000000000000000001010001000101100100"
  1084. "0100110100100001101000001100000000101001010010101011101010101100111110110010111101110110001001110111000010110001110001101001001110001100111001110"
  1085. "1001101111010110101000001110001111110011011100110110101001101111000000100000011010101001101101110100110100001110101001101110101011110100010010101"
  1086. "1010000101000110101100001010011010010011010000011010101001010001011011011101110010101011001011101011010110111110100110110110001010011101100011000"
  1087. "1110001110110011101000001010111101011010110000001110001001011110001111011010011110010011001110100100101011001100001011000111001111110101011110001"
  1088. "0111101101100111101110001001010011011000100010101010101010010000000101101000010011110010101010101010101010101010101010101010101010101010101010101"
  1089. "1100000010000110001100000010010011010011001101111101001001111111101111101011101111111010001111010101000100000000010101001111001010010111110000101"
  1090. "0011000101110111101001100010100011100111010001100001101101111110000101000111011100100000101010000000101111110101100100111001101011010000001101001"
  1091. "1011000011011000101111010110010111100100010110110000001100010110110111100111110110000100001001000110111010010010101101011101001100100100001100110"
  1092. "0000000010001100001010011100111001000111110101110111001101110000110101010100110101100011001110010101001000000011111001110111101111110110101001010"
  1093. "0000000011101001001011000110010011001001010010001111001111011010010111111111101000010110101100110111001101010010110110100010101011011111100000000"
  1094. "1111111011110010001010101011010010000001001111100100001101001110111001100111001001110011101100110011111001011101100010001110101111101101001110101"
  1095. "0000001001111011001110111010001101101101000001011010101111100100100110101001100011100100001110010110100111111000010111111011101000110000101110101"
  1096. "1111101011101001001011011101011100010001101000001101101111010010100000010001100100011010101111110011100001001100011001111100001010010110001110101"
  1097. "0000101001100010101000100110111000101101000100111011001111000000001100010111101010001110001001101000011111011101100010011001001000010110000000101"
  1098. "1110101010101100001101110100101101001110000011011111001100110010111110010110000100111001001001010000010110110011110100000110101100111011001111101"
  1099. "1110101000010110101111100111011100000010111011110111001101000101010111000001011011001010101011010000000110000011001001000011001101010101000000001"
  1100. "1110101010101010101111111111111111101010101010101010101111111111111111101010101010101010101111111111111111101010101010101010101111111111001111111"
  1101. },
  1102. /* 16*/ { UNICODE_MODE | ESCAPE_MODE, -1, -1, 84, -1, "本标准规定了一种矩阵式二维条码——汉信码的码制以及编译码方法。本标准中对汉信码的码图方案、信息编码方法、纠错编译码算法、信息排布方法、参考译码算法等内容进行了详细的描述,汉信码可高效表示《GB 18030—2000 信息技术 信息交换用汉字编码字符集基本集的扩充》中的汉字信息,并具有数据容量大、抗畸变和抗污损能力强、外观美观等特点,适合于在我国各行业的广泛应用。 测试文本,测试人:施煜,边峥,修兴强,袁娲,测试目的:汉字表示,测试版本:84\015\012本标准规定了一种矩阵式二维条码——汉信码的码制以及编译码方法。本标准中对汉信码的码图方案、信息编码方法、纠错编译码算法、信息排布方法、参考译码算法等内容进行了详细的描述,汉信码可高效表示《GB 18030—2000 信息技术 信息交换用汉字编码字符集基本集的扩充》中的汉字信息,并具有数据容量大、抗畸变和抗污损能力强、外观美观等特点,适合于在我国各行业的广泛应用。 测试文本,测试人:施煜,边峥,修兴强,袁娲,测试目的:汉字表示,测试版本:84\015\012本标准规定了一种矩阵式二维条码——汉信码的码制以及编译码方法。本标准中对汉信码的码图方案、信息编码方法、纠错编译码算法、信息排布方法、参考译码算法等内容进行了详细的描述,汉信码可高效表示《GB 18030—2000 信息技术 信息交换用汉字编码字符集基本集的扩充》中的汉字信息,并具有数据容量大、抗畸变和抗污损能力强、外观美观等特点,适合于在我国各行业的广泛应用。 测试文本,测试人:施煜,边峥,修兴强,袁娲,测试目的:汉字表示,测试版本:40本标准规定了一种矩阵式二维条码——汉信码的码制以及编译码方法。本标准中对汉信码的码图方" "案、信息编码方法、纠错编译码算法、信息排布方法、参考译码算法等内容进行了详细的描述,汉信码可高效表示《GB 18030—2000 信息技术 信息交换用汉字编码字符集基本集的扩充》中的汉字信息,并具有数据容量大、抗畸变和抗污损能力强、外观美观等特点,适合于在我国各行业的广泛应用。 测试文本,测试人:施煜,边峥,修兴强,袁娲,测试目的:汉字表示,测试版本:84\015\012", -1, ZINT_WARN_NONCOMPLIANT, 189, 189, "ISO 20830 Figure 9 **NOT SAME** different encodation, Binary mode not used by figure",
  1103. "111111100111111111100010101000011101011111111111111111000111101110100101111111111111111111100101100001010111111111111111101100011011101001011111111111111110100111001010010101111010101111111"
  1104. "100000001000000000111000010110101000000000000000000011110111100101100000000000000000001000111110110011000000000000000000110001110111000100000000000000000010001110000000010001110110100000001"
  1105. "101111100010010100101110011110110011111011110000000011110101010100001011100010110000001010100001111001101000000101101000110110001100001101001011001001110011110001101000100110111010001111101"
  1106. "101000000001110000100110001000100001111011010110111010101110011110101100001111011010101110110010001001111100001111000010111110110101010110101110110110101010101100011110000111110011100000101"
  1107. "101011100111011110100011110111000100111101000010111011011100111101000011001100001101001111100111110000100001010011010010111100000000110111001111001100111010110101001110101111110001001110101"
  1108. "101011101001111100111001000001111101110001001000100011100100001111101010001010000001101010010011111010010000001011100000100100000000001111010101000101110010111010001100011100000111101110101"
  1109. "101011100001011000111100011101111011110101110110000010111000010111101010000000010011101101111010110100001101111000100000111100100110010001010111011011010011011101010100100100011110101110101"
  1110. "000000001111101000111111110010010110101000010011001011001110111111111101100000101011001101101110001001001111111110001110110000101010100110111100001001001010110001001110010100100000100000000"
  1111. "011010001111110110110110001010011000001010100000111010011000101111000000101111011010001111000111010011110010100110010000100111110001010001011110001001111010100001110010000001000011001000000"
  1112. "001111101110101100100011110101010111001111110101100011010010001011001011000111101011001011100101001111011001000000111010110000100011111010110001001101001010110001101100001100110100011011011"
  1113. "000110010011010000110100001010001101100010101010110010011011010111101001110101110100001000000110010000110101000001010100101101000000010001110100000111110011000100010010101011000011100111000"
  1114. "110111100011011000101100101100111001111111000101101011111011100111010011000001100010001100111011011001000100001101000000110101100011011101100101100011001011001110101010110100000110101110001"
  1115. "001111100101010000110001110010111010010010001110011010011111101001000101101000101110001110100010000011111111101101000010101010101010011101111111110001101011001101101000011011110011100001011"
  1116. "001100111010101110110100100000111011011000101110101010111000001010101010101001110110001110000011100110000010001110010010111100101100101010110011111011110011011111010110100010111011000111110"
  1117. "101010111111011110111001101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101"
  1118. "010101010101010100110101010101101000101110100011010011100100101000100111110101111011001000101111000001101011010010011100100001111001011001001011110101001011111001100010101111011100110100111"
  1119. "001001011001100010110000001000010000111010101101001011010011101001101010111001011100001001111111101110000010001011110100101000010101010100000110111010100011011101011011001001010110011001000"
  1120. "101011010011001100111111111111111111010110011110100011111111111111111110001001010101101111111111111111111001010110011010111111111111111111110101100001110011111111111111111110110000100011101"
  1121. "000001100101100100000000000000000001010111010000100000000000000000000101101000110111000000000000000000011100111011011010000000000000000001011101001011011000000000000000000101001111001001000"
  1122. "100001010110110010111101001011000001100011110010101000100001100101100100001101100001101000110111101100011101100111110011011010001110000001000011111101011101100000100101000110100010011010000"
  1123. "111010011001101111100111001110001001010110011001100001110001011110110100010110110010110100101110000111010010011111100010011010111011101001010000111011011010110000010010100111001010011101000"
  1124. "101101111101101011000000111011001001000010111110101111111011111111010111001101001000101001110001010010011001000110101010000110001111100101100010011111001011011111101010110101001001110111001"
  1125. "101000001001010111010111001100110001100011001000101010110110100000010110001010010100110011010100001100011011010110001010001111000100110101100101010110000010111010101111100100010111100000011"
  1126. "100011111110010010001110110000100101000110001011010110100100001001010100111000101100010111111110100011010111001011011101000100010100111101101010000100100111001000010110000110110001111110000"
  1127. "101000110110110110110011110000010001101101100111110101111111000011010101101100111101101111110000110111011101011101100101011010001011011101100101100101101101000101101100000101101001010000110"
  1128. "100000011011100101111001011000000001010000011101001011101010101110000110011101011111111100010001111000011000001010111101011010001111001001010110101000101101101001100110010101000110100010001"
  1129. "101001111001000110111001010000101101000101011001110001111001111101010100011000101100000011101101001000010101011110110100101100100110101101101100110110100000100001010110010110110001011010110"
  1130. "110001000100010111000100000010011101100000101000110100100000110011100110011001100001011000111100100001010111100101010110000010011010000001100000111011100111001000011101110100100000011001101"
  1131. "110100110111110010010101010110110001000000100101011011010101001010010101101110011010101000110001110111011010101010101010101010101010101001101010101010101010101010101010100110101010101010101"
  1132. "110101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101011111110111000011010101001111110110100110101011110000010100100010101100110"
  1133. "101100111101010101001100011101000101110111011111000100110000010011110100100011011000101000000100010110010100110001000101101111101001101101000100101000001111111100000110100111001111001100010"
  1134. "101011001100000001011011011011101001100110001111011001110011111111000110110001011100101100010010110101010000011000101101100000011101001001111010010101110111011111011001010101000101001010110"
  1135. "110101000100011011111001111010010101011101001101011010000100010100100111110011111011010010111111000100010110011101010010011000110000001101011110100010101111010101110011100111011001010110011"
  1136. "100101010111000001100100011001010101000100101101010100000110100011110101100101000011011000001100111001011100110110101111110001110011111101011101100000100011100010111001000100100001000001110"
  1137. "111111111111111111100001001010100101111111111111111111110101101011010111111111111111111010100100001101011111111111111111100011101110011101111111111111111110111100101101000111111111111111111"
  1138. "000000000000000000111100111001001000000000000000000011100001011100000000000000000000001100000010100101000000000000000000110100110010011000000000000000000010011111111110100000000000000000001"
  1139. "111001110110011110101111101110101010111101010100111010110100101101010000111011110111001110000001101100100001100111100110100110011100010010010111110100111010100011010010100011110011011100001"
  1140. "111100101000001000100110011011000011110011110001011011011111010000111001011100110000101010111100000010001011111111100100101110101001000110100110011011111011011010010111100101011100101101001"
  1141. "111011110011101010100110100010000110111100110100111011101001000001111111000001110011001110000011011010000111101111110000101110010000010100100100110110000010101000011011100101000011000101101"
  1142. "000101010110110110110010111100111101100101110010010011101100011101110010101000001001001101110110110111110110001101010100110111001000101010100110001011100010100010111001101101110000101101101"
  1143. "001011110001011000100000100100001101000000010010111011101000001100011010001100100000001111101101010111110000001101111110110101100110110010000001000011110010001000100000010100000010101100001"
  1144. "010010010111111000110011100010101010111110001001100010101111010010000000011011101110101001011010010010110111100101001100111111101001011101010110010001011011001010000000111100111100010111101"
  1145. "111100001110100000100101001111100101101111001011011011111111001111010001010001010010101000011101010111110101010100010000111011000011010100110000110011010010100010001001011110100001001001101"
  1146. "111011001101010100111000000010101100010101010101010011010101010101010101010101010101001101010101010101010101010101010100110101010101010101010101010101010011010101010101010101010101010101001"
  1147. "101010101010101010101010101010101010101010100101011011111110110000100111101000000111001011010100000100101011100100010110101001100101101011111100101100010011000011010110011111101110010110101"
  1148. "110000101111101100111111100110011110010111001011000010010101101000100011000011011111101110000111010111010011010100101100111011000010111111001001010111001011011000011011101010001100100101001"
  1149. "111101011100101000100101001100101010111000001010111011100000010000011101001011110000001010101000010100111000100010001000100110010110100010011101011100110011101010101010001111011011110011001"
  1150. "101110011001110000100111000001101001101110111011101010101000010010110110010110011001101101101110100110000100110000001000111001101011110110011100110001001010101011011111110000000110100010101"
  1151. "110111000100100000101100111010010011101111111101010010111110111100011000110100111001001110101110010011001000111011110100110101110011001010110000111100000011000000110100011101100010111011001"
  1152. "111010101100111000101101011001011100110101100111011010011101110011010000110111011011001100110001110000011001110000011110100100010110110010011111001011001010100011001101100111000111111010101"
  1153. "001111000011011100101001011101110101000011010101111011001101000001011011010010001111101011111001111010011100101110111010101001110110011001101000011001110011101101011000010001100111010100100"
  1154. "100011111000010110111111111111111111010011111111100011111111111111111100011100011101101111111111111111110101010111111000111111111111111111011001000011011011111111111111111111110100111010101"
  1155. "001101111110000110000000000000000001101011111110010000000000000000000101000101111111000000000000000000010100111011110110000000000000000001110110101001111000000000000000000101111001111101000"
  1156. "110110000011011000001011111101100001010011001000100111101111000100010111111001110110110111010010011001010011000000001001101001000100011101000101010011000011001010000101000111010001010001100"
  1157. "101001110001010100000010011010110001101011010100100010001000110101000101010101001011111100010100011111010100011011001110011110010011111001101101101101000111111000110100110110001001111010111"
  1158. "101110011101011100110011001000110001111110100100100001110110000001010111111011101000100001101111111001010100111011101100010110010100101001100011010010000000001011111000110100000010110111101"
  1159. "111101001110111101101010010010100001101100111101011001100101101111010100101000000110001110111011111011010011011010100110110100100110011001100100110100011000101000100100110111011101001001001"
  1160. "101000101011100001101101100111011101001110101110111011011010001100110101101100101010111011101000011001010101010111101101101000010101010101010101010101010101010101010101010101010101010101010"
  1161. "101010101010101010101010101010101001101010101010101010101010101010100110101010101010101010101010101010011010101010101010101010101010100101110000111110001010010001001101010110001001010011001"
  1162. "100000111011010001001010100011010001101101110001011010111001111100000100001101000101001010110010010000010110101100011101001001100111011001101001100100110001100000000101010110100000011101001"
  1163. "101010011011101011101000001110001001110011011001100111001000101011010101010101000110001000101100011101011111100111011001110111001000111101100110100110110001000111110010100101110010100101011"
  1164. "101010111010001011101010101010001001011000110001111011001110101010110110010001100001010011101110000000010101001111110011011010000000001001100111011000110001100110110110110110010111101110100"
  1165. "110111110011001000000000001101001001110011001101110011001000111100100110100001101110100100011011110011010100000100010001110011111111001101001110010100100010011101111011000110100110100110011"
  1166. "100011010100100100011111011101010101000110010010111011111110010110000110011110011100100011111010010010011010000011010101110110011111100001110100000110011000011011011010110101000100101011100"
  1167. "111111100001101110001010100101010001001001110011010101010101101000000101001100110100111111010111001100010011111101000100000010010110111101111001100000111111010001110000100110110011111001110"
  1168. "111011001101000110001001001101101101111111100001100101100010010111010100011100101001101101011010010001010100110011100101110111010111010101101110101101010110000001011111000111101101101101011"
  1169. "101101111110011010010000011100000101001011100101011001100110000001000110101011011011011011111111100110011100000111000100000111011010011001110110111000101011000011110100010110001010011000010"
  1170. "110111001110000110010110000011111101111011000000001101111010100011000111011001100011011101011001110111010110101010100011000100000111101001000010000000010100011001110111010110010111110101110"
  1171. "111111111111111111110001010100110101111111111111111111111101001001000111111111111111111010001110010101011111111111111111100100011001111101111111111111111111111110010100110111111111111111111"
  1172. "000000000000000000100110000111010000000000000000000010101101101100100000000000000000001010011000011110000000000000000000111000111010100100000000000000000010001101111010100000000000000000001"
  1173. "010001001101110110110010010100100000000111011010110010101011000001110111100110000000101001011111110110000000101101000100101111011111000111100010000101000011101001011000101111110011000001101"
  1174. "101101000001010100110101101110011101001011101101110011001101010111011001010010011100001100110010001110111000010001011010101110101011001110110100101100111011001101001110010100100001110000001"
  1175. "000110010101001010110111101110101010101110011000100010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101"
  1176. "010101010101010100110101010101010101010101010101010011010101010010011111111100100011001010010011100010011111100010111110101101100100011000110001110111001010000010011011010001111100100100001"
  1177. "001100111101001010101001110011010011101101011111001010110101001111010101010010000001101001100001100100001101001000100110101100100111101010111110100011111010110101110110000010111001100000101"
  1178. "100011001111010010111010111000010001100000000001110010001100110000001110001110110010001110100000010111111000111100010000101110101100111010100111001110100010101110000011110010000011101011101"
  1179. "010101010011100100100100011010011001111101000100111010011100101101111010100111101100001001001110011101011111111000010000111110100101010110111110111011110011101111010010010011000111011110001"
  1180. "001010000001011000110101110100011001001101011000111010110111000111011001000110101011101101010011001011001101110011010000111011011100111110111001000011010010111111001001010100000110100001001"
  1181. "110110001100101110110000101011110111010110011101010010010110101111101101110110010001101001001110011000111001110001011110101100110010000100110101001110101010011100101101001011100101001111101"
  1182. "001101010111101010111101011111110010000100011001011010111101010011110110110110001010101111111011111111110111100010100010110011101101101111111001101001110010110110110110100000011001001000001"
  1183. "110000001010000110110110111100010100110110110111010011001010100000011010011011100000101111011110110111000101101101110000100110001000001101111101100111011010110010101110111100001001010001101"
  1184. "000101110111010000100100001011100100110111011100110010010100111010000111101001101111001110101011000110001011010001001010110101001111001111101010011010001011101001110110100001000100110011101"
  1185. "000011011101101010100100100000110101101100000010110011110000010010001001110100110010101000001011011110011111100101011010111110101111010111011000000111011011101101001010111011100100010110101"
  1186. "111000011010010110111001010110011011111110110011011011011111000111011101111111101101101001011101100000000000001011000100101000100100000011000010110010110010111100101111110011010111100100101"
  1187. "000100110101111110101000110000011101000101110111000010100001110011111111010011001010001000001011111001101110011011100110100111010100000111010011100111010011111110000101001110101101111011000"
  1188. "100011000011010010111111111111111111011100110111111011111111111111111100110101110001001111111111111111111000100101000010111111111111111111010010111001000011111111111111111100001110011011101"
  1189. "001001110011011100000000000000000001000101000011101000000000000000000110101011011011000000000000000000011101000110101010000000000000000001101010101010101000000000000000000110101010101010100"
  1190. "110101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101011001110010100111101101100100101"
  1191. "101100101101010010101101111100010001001111001100010100001110101010110111100100111000110011001101000001010000001011011001000110111001110101001111000111110111101011001110110111100000010000010"
  1192. "111110100101011011110100010001010001011100000011011010011101101010010110110010111110101000011110110000011111110111000010000011000011110001011101100000001001110001001000110100100111001000111"
  1193. "110001100000011010010100111000001101100011010110011010101111001000000100101110100110000000010001011100011100010001101001100100111001010001101110101011111010000011010100110110000100001111010"
  1194. "101101101101010100111110110101111001000110011000000110000000111110000110101110010001110110000011001101011001001011000111000010100110011101110011100110000111111101101110100100000010001001011"
  1195. "110010010111100101111111110010100101110111000001100110100110001101010101000101110011011000010010100001011101001011110111101000010011101001111001000110000010111110011111010101000000001000101"
  1196. "100010110110100101101000100110000001011000011011001010001111100101000100110011101011000101110000001101010010111100001110100011101101111001110010101111101000101000110011010101010011010000010"
  1197. "101010001000001110101111011100000001011110000001011101101110100001100100101110010100101101011011000010010110010010011010010010101000110001001000101010001110010011000111010110110111100101010"
  1198. "111000111010010111101011001111100101001110011110111111001100110010110100001100110111111111001100010010010111010101110110110011011011011001101100100111111001001111111010110100001101111001110"
  1199. "101010001110010100010100010101101001111101111000101000010101101101100110110000010101110010010111001111011101010111011100001100010111101001110101010101111001110110000110010110010111111011111"
  1200. "101111111000111100000111001101101001100101100111011111100011011010110110110000010011010010011110100101011100001001100100111111000000001101010000101001001001110000000110010111101100101001011"
  1201. "111000100101010110000011000010111101111011010000111000111001001010010110101001101100011000100010101111010001010101100000100010110101000101100001100101001011010011101010000110000010010101110"
  1202. "110110000000111010010100111111100001000010100000011001101010011110000110011111011010101010100011010001011011001001110011111011111101011101011000010000111010011111110001000111111100101001101"
  1203. "101010111101100010101010101110111001001100101010101010101010101010100110101010101010101010101010101010011010101010101010101010101010101001101010101010101010101010101010100110101010101010101"
  1204. "110101010101010101010101010101010101010101010101010110111001000110110110001001001110101011001110001011011010000011011110100100111001100101100010001010111000000110111100100111111011100101110"
  1205. "111111111111111111100100001001111001111111111111111110110111111001100111111111111111111110011100111011011111111111111111111001011111100101111111111111111111111010100110110111111111111111111"
  1206. "000000000000000000100101001101010000000000000000000011100100010100110000000000000000001001000010110110000000000000000000110110000011101100000000000000000010001100001010110000000000000000001"
  1207. "010011001011111100111010010110100111001000000011110011010100011011011001010000010010101100000000101100110110010000001110100101110011100000100001001110010011100101010010101110110011111011001"
  1208. "111101010101101010111000110010000100101010101001000011001110101110101111001011110001001011111000100110111011001101111000101001001100011111110110011000100010001110011011110111011001110101101"
  1209. "101011100110101100100101101110100100111001101001100010011111110000110011011100110111001001010101101111001101011101100000100011010100000000000010101100011011110010110110000100101100100100001"
  1210. "101000110101100100100110100100111110101011100111001010101011011001100111101111101011101000001001100110110001001010011000111110111101001001000111100000000011000101011100111010110000000101101"
  1211. "101010000110100100101111110101010110110000110011101011001010101101101000001001000101101001010100110111001011010100100100110000000000011011011111010111110011110000100000100111101100101001001"
  1212. "111111110101011110111100010101110010100110101010001011001000101110000010110111011001101111001111100100110010110110001100101100010000000001100010000010101010010010011001110000110100001011001"
  1213. "010110101011011000110101101000001001101001110011101011010011100010111001001000000111101011100010101000011100110001001000101100010101010100001101010000011010101101100111111110010100001010101"
  1214. "010011101100011000101010100111000101110011001010111010001011011011001010101011000100101010100111111111101010011011101110111011000010011101100011101101100011001100100010010111110010110100101"
  1215. "101100100011001010110001111100111000010011000111010011101001001000001100110100110110001110011011010000011110000111111010110101001111011110000101101000000011100000001110010101001000100100101"
  1216. "100101101000011010110011000111101100101100011011100011100011000000111001011100110111101010110011101010100010101001010000101100110110111110010010110010011010100011100111010010101100010111101"
  1217. "110010101000010100101110011101001000000100000010010010001100100100000000010011101100001100011100010100101011000100010100110001111111011010100010101010100010111000111000101010101010101010101"
  1218. "010101010101010100110101010101010101010101010101010011010101010101010101010101010101001101010101010101010101010101010100110101010101010101010101010101010011010101010101010101001100111000001"
  1219. "110010001010101100110001110110001101011011101111110011111000111111000100010011011100101001011000011010101010000001110110110011010000010010011000000110110011000110001110001011100010010011101"
  1220. "000000000001011110110010110000000010010011010011011011111110111011011001001111011111001111010110001000011011101010110010101111001010101110000101011011000011011110110000010010101111010111101"
  1221. "001110110010011100101101010101000001110011101001010011000001100101111010101111000110101011010010010100010111011101001010101101001011101100000100000110001011001100010010000000100101000000000"
  1222. "101001010101000000111111111111111111110111000000111011111111111111111110001011101010001111111111111111110001101101001110111111111111111111010101001100110011111111111111111111110010111011001"
  1223. "000100001001001110000000000000000001010011100010001000000000000000000101101111000011100000000000000000011001001001110100000000000000000001000111011011000000000000000000000101100100010111100"
  1224. "110001111000000010011011010001011101001001001111110011001100000001100111110010100001011111100011001101010111011011100001110110111100111001001001001010011111011000111101010111111001111100111"
  1225. "100110010110001010111110001101000001111111001101110010110000111111110111010111001000111010001011100110010001111110101111000100110001010101010110000011000011000011010001010101100101010010001"
  1226. "111100000110000110100111011110001001110100111000111011101000001110110100101100001000111011010000101000010001000111101010011110001011100001110011010100110111110011011011010111101000000100001"
  1227. "101110101000000011111011101101110101000010001001000101010010001001100110100110001011011000000001011000010000001001011010111010000111011101001000100101101101111011000001000110001101101100010"
  1228. "100011011100010100010111111010111001111010100111000010010101111101100111110001101111001000000101011001010100110001001010110100101010101001001101110001100011100000011011100101110000000110111"
  1229. "100110111101011101110101101010011001001111000100000111001000010100100111010001001110111111000100110110010100001100011010011010101110011101111001010010110011010000011010110110001001010001101"
  1230. "100011011111011101000000101001010001101101101110110100111110101010010110111001111101000100010100100101011010000110100111011101100000011101001111100010000101001011110000010111110000101111111"
  1231. "101100001011111111111111011110010101000001101101101001100101101111100101111000100101010010000001010111010101100101101100100100100011011101101001011010100110100111001100010100011010110010111"
  1232. "100001001101001011001001110101110001101001010101000101000001110001010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010"
  1233. "101010101010101010101010101010101001101010101010101010101010101010100110111011001110101101111010011111011000011101111001000111010100111101100001000001110110010010000111010101101010011101011"
  1234. "101111010011010010000111101101100001100110111110000010001010001101110111000011101001101101011100000001011010101100100110100110110110011101010100011001101101101101010001000100111011110010011"
  1235. "100110110110110101101010011101101001001011111000110010110111001111000111000011010111011001001001110011011100111110111000100000001110110101100100101001010110000101100111110101000001001001100"
  1236. "101110111000000100001101001100001101100111001010101001010111000001010101010010000100000111110000110111011110011011001011011000010001010001100110001111110001001010111000110101001011110100111"
  1237. "101110011100111101100111011000101001010101011100111011010110110110110100110011000101100111111101011011011101011100111011110011010000101101111100001110011101101111110101010111010101111011100"
  1238. "110111011000010100100010101100010001111001010010011110111111100110000100111001000000111100111001010010010001011100111010011111001001110001111000001011001111010011110100000100011000110010101"
  1239. "111111111111111111101101110011001101111111111111111111100100010101010111111111111111111001001100110011011111111111111111101010111101010101111111111111111110101111100000000111111111111111111"
  1240. "000000000000000000110100101011001100000000000000000010010000111000110000000000000000001010111100101111000000000000000000101011010010011100000000000000000011011100101100100000000000000000001"
  1241. "011001010000110100111010100010100010111100010011001010001110110100001100110001011010001000001010100111111010000001100100101110001101000000111110100011111010111111000110101011011001010111001"
  1242. "111111110100100000111110010000110000001011111100100010011111010100101000101111000101101111010101001011110101111100111110101100010011111000001001100101101011001101110110101101011110100110001"
  1243. "110011111011000100101010000111010110101110100000010010011110000110111010011111000011001001000100001010001001011001001000110101010111110111101100110111000010011101101011110010111101011000001"
  1244. "100011011000011010110111111111100000111001000001101010101111001010111101001011111001001011101101010001010001010110111000101101110101110100010011001011010010111111101101100100110101100001101"
  1245. "101010100010100110111010110001001110011100011100000010111001000110010011001011111100101110100011110111001001101011010100100110011011001001010001011110000010101000101101111101111010100110101"
  1246. "011010011100111000110100011110001100101000011110100011010111101100111101101001011010001100110010001110101001000010010110100010101110011111001010111011001011110101010101111011101011100101001"
  1247. "101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101"
  1248. "010001111001111010101111111110110110010110011110000011000001010001101001000001000101001010001010011100001110100011001000101101101101001010001001101010011011001100110111000111011100010110101"
  1249. "110111101000000110111011010100000011000110110111100011101100101001001011000111001111001010001011010101001010100011011100100001110110111011110101001111010010101011001101011111111101011000101"
  1250. "101111111100000110111101010011001000010111001000001011111010001011111011111100001100101110100000001010101011010110000110111001001001001000001110010100011010110101010010101001000000111001001"
  1251. "000000111010010100111110000011011011111000011111010011011011011100111111010011111000001011110001100101010110000011010010111100011100101101011000010000010010001110111010111110011110110111001"
  1252. "111011010111101110101111010111100110101100101100000011100000010000110110000011100101001011111011000011100100000110111010110010110001010110010010111001010011101010010000111000101110010001101"
  1253. "101100010010011110111101111010011001011010001111011011000000001101110111111001110001001101101111101110001100111010110100110111011000011110001000011001001011110110111011000100100000101110101"
  1254. "111000001010001000101010001111011001010000000101000011100011111011011100101011011110101100100010101111101000011000100100111000100111100110000000000011110010000110111010011000010110110000101"
  1255. "001000011000001100101110100010101100000001000111010011101010001011000100111001101010101101000101110111001110101010110100100100011000011010010000110011010011111011000010111000100100100101100"
  1256. "101100010100000000111111111111111111111010001101110011111111111111111101111101001111101111111111111111110101011100010110111111111111111111101000100000100011111111111111111100101110101101101"
  1257. "000001010101000110000000000000000001100100010010000000000000000000000101110010111111000000000000000000010011000101010100000000000000000001111011011000010000000000000000000100101100001011000"
  1258. "101101111001000111000000001100010101010100110111101010011000000010100111011011010010101000100101001001010101111100001001000111101100100101100100110011011001111101111001110101111111111011011"
  1259. "101000011100011010000001001011010001100010100010111001010001010100010100101010111111001001100100101010010110110110111100011001010001011001011110011001101010110001000010010111010011011010001"
  1260. "100001101000100111001000000101000001100111110110101110001100111101000111000010001111101100111110001100010101011010011010110010000101111001110111111111111001001011101000010111010011100110110"
  1261. "101011101110001000100101101011000101011001111010001110000001011010100110000010101000100110101010101010011010101010101010101010101010101001101010101010101010101010101010100110101010101010101"
  1262. "110101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010110110111011100011010111110101100111001111101110010001100101011100111100111100100010101000100110"
  1263. "110010010101111101010000111010101001001101001011110001110011001100010110011100010110000101001100010110011100111101110101000110100101011001100101101100111010000101010101010100110110001100110"
  1264. "100010010010010111011011100100100001100010011001111111100111101000110111000000110101110101111001000010010111101010110101111000001101110101100000111010100101001011001000100110101001101111001"
  1265. "100100011001011101110111110001000001110011010111000101100110011010000100101001010101011001001001110010011101010011001111000000000110001101011011000011000001001001000111100110110111010101110"
  1266. "111000100101101001011110010110111101001111111000001011101010111110110101010001101001011000000110000100011000101110011000110110000011111101001001101010101011110110100101000101101111100110010"
  1267. "100011101100111001101001110100011001101111001111110011100111011110110100000001111010111010100000011001011100110010001110001011011010011101010101100111100011001100010111010101011001101011010"
  1268. "110010110010011111001010000001110001100010100010010001010010001000100101101001011101000010000110101011010100010011101100111110100011111101010111001100000000110011101001000111001010000011111"
  1269. "101111010010111011101011110000011001100010000010100101100111000010000101000000101011110100010010110101010100100110101001100100111011010101111111111000111100001001001011110100100101101100101"
  1270. "111100011100001101101111110100011001010011110001011110111001011001100101111111101000001001010000010110010110101001110010001001110101111101110110011010011011010001000011010100101000101100000"
  1271. "111011010001111000101101000110010101101111001010010011101111110101000111100101000110000100010011111111011001110010101000001000011000111001110011111000111111000111111001010111011010011100011"
  1272. "100111000001100000110010000000110101111000101001100010101111001111010100110011011110010111010101110110011110111110100011111111011111001001111110000100000111010000011000100110010110100001101"
  1273. "111111111111111111101001100101100001111111111111111111101000011111010111111111111111111010101011110001011111111111111111110111000100111101111111111111111111101100111010100111111111111111111"
  1274. "000000000000000000110100100110110100000000000000000011010100001001010000000000000000001101011011000111000000000000000000101000001010000100000000000000000010101100100101010000000000000000001"
  1275. "111100001011101000101100111111110010000000011110110011010001101011110111010111110110101100101001101100101000000110010100101111110100101001000100101001010010000111100111001010111011101101001"
  1276. "110000101110010100110101010101010101010101010101010011010101010101010101010101010101001101010101010101010101010101010100110101010101010101010101010101010011010101010101010101010101010101001"
  1277. "101010101010101010101110000000010001110100101101111011000011010000111001000001101010001100001110010100110101100110101110100001110110110001111001000110111011010110110011000101011001111110001"
  1278. "111110000010100010110101110110101101011010010000101010101100011011100011001101100101001111001100100001000010101111111010110001001111100111011010010001110011001001000100001100111010001111001"
  1279. "111111001011011000111011101011100111000011000111101011111111111001111110011110010110101001110010011000111001000001100000101111100110010101010110001011000011010101000101111000001010010110101"
  1280. "001010101100100110110001000001101000110011011000100010101110110111101111001010101011101011010010111000000110010100000110100000001001001101011001100010011010101011000010001101100100000000001"
  1281. "001110001001110000100110110001000110010001000111110010110011000001011100111101100110001001010011001110111100011111010110111011011010010100100000001001001010000101100110010010000011101001001"
  1282. "101000110011001110110100111000000111011001011011011011010111000001011101000011111000101010101100011010111110010011110010110001010010111010100111110111111010111100110000100101111001000001101"
  1283. "000000100101110000100000101111000100100011010101001011010010001100001000110000111011101111101010111000111011101110010010110110110001010010011001111001101010001011100000110011011110100010110"
  1284. "000000001100001110111001010000001011001011000010000011100111101000000110011001111110101010000001100010111110000001000100111101110011100000010110010100100010101011111011110101000000100000000"
  1285. "111111101111100110101011101111100101011100001000111011011010010110001011010100000101101111000110100111001111111011011010110111000000110010100001010101010010110100101100010100000011001110101"
  1286. "000000101010100010110000100011101010110011110001100010010111100010001010111010100000101001010011111100101110101000101110110101000101000011101101110111000011100100111100110010100111101110101"
  1287. "111110100001101010101001011111100101000001111101011010001111001001010110100100100100101000100010111011110110001100110010101101001101001110100100011011000011001110101001010111111001001110101"
  1288. "000010101101100110111111000100110100010111110000111011010010011101000001111111101111001010001100100100000011011110100000100010111101011100010101000000100010011100111100000010000010000000101"
  1289. "111010100010101100100001000111011001111101000101100010010010110010011100110011010010101111011001001011011110011110101010101110111100011111011000001001101011010100101111100010111011001111101"
  1290. "111010101011011100110101010010111000001100010010111011010101010101010001010101010101001101010101010101000101010101010100110101010101010100010101010101010011010101010101010001010101100000001"
  1291. "111010101010101010111111111111111101001010101010101011111111111111110100101010101010101111111111111111010010101010101010111111111111111101001010101010101011111111111111110100101010001111111"
  1292. },
  1293. /* 17*/ { UNICODE_MODE | ESCAPE_MODE, -1, -1, -1, 4 << 8, "汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。它的主要技术特色是:1. 具有高度的汉字表示能力和汉字压缩效率。2. 信息容量大。 3. 编码范围广,可以将照片、指纹、掌纹、签字、声音、文字等凡可数字化的信息进行编码。4. 支持加密技术。5.抗污损和畸变能力强。6.修正错误能力强。7 .可供用户选择的纠错能力。8.容易制作且成本低。9.汉信码支持84个版本,可以由用户自主进行选择,最小码仅有指甲大小。10. 外形美观。", -1, ZINT_WARN_NONCOMPLIANT, 67, 67, "Previous draft Figure 1 **NOT SAME** different encodation, Binary mode not used by figure",
  1294. "1111111000010101011111111111111110001011011110010101111111001111111"
  1295. "1000000010000100000000000000000010100011101001010001101110000000001"
  1296. "1011111001100100110100001101111011111100101010000111111111101111101"
  1297. "1010000011010001001000011101000011111110111001011111100101000000101"
  1298. "1010111000011101100100100001110011111101011101101011011111101110101"
  1299. "1010111011110000000100000101110011100011100011100011110100101110101"
  1300. "1010111011000110000011001011001011110110001010100101101111001110101"
  1301. "0000000000010011100110010011011011000111101101001111111101000000000"
  1302. "0010101100110010001100111111010011001110010110000110100100111000000"
  1303. "1100010010001111111101001101001011111010010100110011001010010001100"
  1304. "1110001011001110000010010100101010110010010010111010001000000101000"
  1305. "1000010011000111111001000011111011101100011010010111110011110110111"
  1306. "1011101100011011001010101101100011111000011110101001011101101100100"
  1307. "1010101100001100101111110100010010110010011100000101100110011010100"
  1308. "1011100110100101010000001101011011001111001001011101101001010000010"
  1309. "1000110001000110010011101001111010011100010101100010001100001100000"
  1310. "1110111000011000010011111001000010011001001000111000000010000011100"
  1311. "1111111111111111011111011011011011111111111111111110101001010000101"
  1312. "0000000000000001101010110001000000000000000000000101110111011010000"
  1313. "1011000000111001101001011111000001001110001001110101011111101010000"
  1314. "1101111001111001101011110110000111101111111001110100111100001000111"
  1315. "0000010100000001111111001100011100100000001100100100111010110101000"
  1316. "0000000001011001010101010111101100010011010110110111100001001001001"
  1317. "1111100011110001010010111011111001010010000100100110111001111001110"
  1318. "0111000001000001101111001001110101001011111111000111000100111101001"
  1319. "0110100011111001110101110000010111101100110011110100101111011100011"
  1320. "1100110110011101000101011100101101010011100101010100100010100001100"
  1321. "1110000110010001001110011101110000011010100011110101011000011110111"
  1322. "0110111001111001000110110111100110111011101011100111111110110111010"
  1323. "0110001110100001000001011100011110101111101000000101000110011100000"
  1324. "0011100000010001010111100100001001111100101000110101001000101100001"
  1325. "0011001100010101010010000111000011110111000111100100001110000111110"
  1326. "0000101111100101010011001110010001011000000011100111010010111000010"
  1327. "0011101110110001011110110110000111011001000111100110101000000000100"
  1328. "1001100100000001111111111111111110111001100101110111111111111111111"
  1329. "0001010111111100000000000000000010011111111111110000000000000000001"
  1330. "1001000011000011000000100100011011100110100001010101100010010001101"
  1331. "1111010101001110010000110000000010110110001100111011001001000101001"
  1332. "1110010110101110101100101001001011000100000101010100000110111011001"
  1333. "1010100110000000010001111110110010111101101100000110110011110001001"
  1334. "1000111010101011001100101101010011100010110100111011110001100000001"
  1335. "1001000011100101100000001010111010001110110110100110100100000100101"
  1336. "1000111011000001101101100011001011101111110100010100101011110011001"
  1337. "1011111101100010000011100110111011111110110011100010011011101110001"
  1338. "1011000000001111011100100110011011010010111110000100100011100010001"
  1339. "1101100010000101111010111000100011110100101010110111011010110001001"
  1340. "1001000011001110100101100010101010111100101100011100010100111010101"
  1341. "1000000011010101101010100011111010011000011111111010100001101011001"
  1342. "1101000110100100011111001110111011001000000100100000111110010110001"
  1343. "1111110100001111111101100110111011010110010100000001101011010010101"
  1344. "1000001100001001001110011110111010001100000011011100101100100011000"
  1345. "1111111111111111111011011001111011111111111111111111100111000010001"
  1346. "0000000000000001011000100101010000000000000000000110011010110100100"
  1347. "0001110001101101011100101111100111111000010010000101000001011100110"
  1348. "0111010100110001000010100001101000001001010110000111111101100011100"
  1349. "0011011001010101001111011111001101101100101101010100101111001111110"
  1350. "0001101100100101011100001110111010011110010010100100100001000101001"
  1351. "1001011100010001101010010110011000110110111100000101110110000010000"
  1352. "0000001111000101011011011010010110000010111000110100011001011010100"
  1353. "0000000001101101011110101100001101100101100001110110110111000000000"
  1354. "1111111000111101000010111100100101111011111010010110011101101110101"
  1355. "0000001010111001111001001100110011010101111100110100010010101110101"
  1356. "1111101011100101001111011101111011001000100010100111101010001110101"
  1357. "0000101000011101111001100110101001011110101110010110100010100000101"
  1358. "1110101010010101000111011101001011100010000001100100010100001111101"
  1359. "1110101001101001000100110010101000000101000110010110110110100000001"
  1360. "1110101000010001111111111111111010010111110110110111111111001111111"
  1361. },
  1362. /* 18*/ { DATA_MODE, -1, -1, -1, ZINT_FULL_MULTIBYTE, "é", -1, 0, 23, 23, "Mask automatic (01)",
  1363. "11111110100010101111111"
  1364. "10000000001010000000001"
  1365. "10111110111010001111101"
  1366. "10100000100101000000101"
  1367. "10101110001111101110101"
  1368. "10101110110100101110101"
  1369. "10101110011101001110101"
  1370. "00000000101010100000000"
  1371. "00010101101101001000000"
  1372. "00001011010010000111010"
  1373. "10100010010010101010010"
  1374. "10110101010101100010110"
  1375. "10101000010110101010100"
  1376. "10011111000110000101000"
  1377. "00000010000001110101000"
  1378. "00000000101001100000000"
  1379. "11111110001000001110101"
  1380. "00000010110000101110101"
  1381. "11111010110001001110101"
  1382. "00001010010000100000101"
  1383. "11101010010100101111101"
  1384. "11101010001001000000001"
  1385. "11101010101010101111111"
  1386. },
  1387. /* 19*/ { DATA_MODE, -1, -1, -1, ZINT_FULL_MULTIBYTE | (1 << 8), "é", -1, 0, 23, 23, "Mask 00",
  1388. "11111110001000001111111"
  1389. "10000000111111000000001"
  1390. "10111110110000001111101"
  1391. "10100000010000100000101"
  1392. "10101110100101101110101"
  1393. "10101110000001101110101"
  1394. "10101110010111001110101"
  1395. "00000000111111100000000"
  1396. "00010101100111110000000"
  1397. "01011110000111010010000"
  1398. "00001000111000000000111"
  1399. "11100000000000110111100"
  1400. "00000010111100000000001"
  1401. "11001010010011010000010"
  1402. "00000001101011110101000"
  1403. "00000000111100100000000"
  1404. "11111110000010001110101"
  1405. "00000010100101001110101"
  1406. "11111010111011101110101"
  1407. "00001010100101000000101"
  1408. "11101010011110101111101"
  1409. "11101010011100100000001"
  1410. "11101010000000001111111"
  1411. },
  1412. /* 20*/ { DATA_MODE, -1, -1, -1, ZINT_FULL_MULTIBYTE | (4 << 8), "é", -1, 0, 23, 23, "Mask 11",
  1413. "11111110000101101111111"
  1414. "10000000111000100000001"
  1415. "10111110110000101111101"
  1416. "10100000101000000000101"
  1417. "10101110111101101110101"
  1418. "10101110100110001110101"
  1419. "10101110101110101110101"
  1420. "00000000111000000000000"
  1421. "00010101100000111000000"
  1422. "01000100011111101010111"
  1423. "10010010100111000111100"
  1424. "00100101101111110000100"
  1425. "01000111010010111000110"
  1426. "00001101111110010111010"
  1427. "00000011111001110101000"
  1428. "00000000001110100000000"
  1429. "11111110110000101110101"
  1430. "00000010001000101110101"
  1431. "11111010110110101110101"
  1432. "00001010001000100000101"
  1433. "11101010101100101111101"
  1434. "11101010100110100000001"
  1435. "11101010111010001111111"
  1436. },
  1437. /* 21*/ { DATA_MODE, -1, -1, -1, ZINT_FULL_MULTIBYTE | ((4 + 1) << 8), "é", -1, 0, 23, 23, "Mask > 11 ignored",
  1438. "11111110100010101111111"
  1439. "10000000001010000000001"
  1440. "10111110111010001111101"
  1441. "10100000100101000000101"
  1442. "10101110001111101110101"
  1443. "10101110110100101110101"
  1444. "10101110011101001110101"
  1445. "00000000101010100000000"
  1446. "00010101101101001000000"
  1447. "00001011010010000111010"
  1448. "10100010010010101010010"
  1449. "10110101010101100010110"
  1450. "10101000010110101010100"
  1451. "10011111000110000101000"
  1452. "00000010000001110101000"
  1453. "00000000101001100000000"
  1454. "11111110001000001110101"
  1455. "00000010110000101110101"
  1456. "11111010110001001110101"
  1457. "00001010010000100000101"
  1458. "11101010010100101111101"
  1459. "11101010001001000000001"
  1460. "11101010101010101111111"
  1461. },
  1462. /* 22*/ { UNICODE_MODE, 3, 2, -1, 2 << 8, "sn:7QPB4MN", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 3 Example 1 same with explicit mask 01 (auto 11)",
  1463. "11111110011010101111111"
  1464. "10000000010101100000001"
  1465. "10111110001010001111101"
  1466. "10100000110110100000101"
  1467. "10101110001110001110101"
  1468. "10101110110101101110101"
  1469. "10101110001100001110101"
  1470. "00000000101110000000000"
  1471. "00010101001010100000000"
  1472. "01010110101101010100000"
  1473. "01100011010101010010011"
  1474. "00000110111001011111100"
  1475. "11001111110100100001101"
  1476. "01100101110111101110100"
  1477. "00000000111000010101000"
  1478. "00000000001001100000000"
  1479. "11111110000011001110101"
  1480. "00000010101010101110101"
  1481. "11111010010011001110101"
  1482. "00001010111111100000101"
  1483. "11101010001010001111101"
  1484. "11101010110101000000001"
  1485. "11101010101010001111111"
  1486. },
  1487. /* 23*/ { UNICODE_MODE, 3, -1, -1, -1, "price:£20.00", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 3 Example 2 same",
  1488. "11111110011010101111111"
  1489. "10000000010100100000001"
  1490. "10111110010010001111101"
  1491. "10100000100110100000101"
  1492. "10101110001101001110101"
  1493. "10101110110101101110101"
  1494. "10101110000010001110101"
  1495. "00000000110101000000000"
  1496. "00010101011010100000000"
  1497. "01011001001101010100010"
  1498. "10010011000100111001010"
  1499. "11101111000010101100010"
  1500. "11000110010011100000110"
  1501. "01011010111111101011101"
  1502. "00000000101001010101000"
  1503. "00000000010011100000000"
  1504. "11111110001110001110101"
  1505. "00000010111100101110101"
  1506. "11111010001001001110101"
  1507. "00001010110001100000101"
  1508. "11101010001110001111101"
  1509. "11101010110100000000001"
  1510. "11101010101010001111111"
  1511. },
  1512. /* 24*/ { UNICODE_MODE, 3, -1, -1, 2 << 8, "C:\\DOCS\\EXAMPLE.TXT", -1, 0, 25, 25, "AIM ITS/04-023:2022 ECI 3 Example 3 same with explicit mask 01 (auto 11)",
  1513. "1111111011101010001111111"
  1514. "1000000001110000000000001"
  1515. "1011111011111110001111101"
  1516. "1010000000000110000000101"
  1517. "1010111000111001101110101"
  1518. "1010111011000001001110101"
  1519. "1010111001000100101110101"
  1520. "0000000011100110100000000"
  1521. "0001011000000011011000000"
  1522. "1000101010100000100010100"
  1523. "0111000110011110000000011"
  1524. "0110011010100100100110110"
  1525. "1010100111110011001011000"
  1526. "0111010100110110111011111"
  1527. "0100110110010101101001011"
  1528. "1110100011110101010101010"
  1529. "0000001100101101001101000"
  1530. "0000000010110101100000000"
  1531. "1111111010101101001110101"
  1532. "0000001000011001101110101"
  1533. "1111101011011110001110101"
  1534. "0000101001010101000000101"
  1535. "1110101000100011101111101"
  1536. "1110101001101100000000001"
  1537. "1110101000001010101111111"
  1538. },
  1539. /* 25*/ { UNICODE_MODE, 4, 2, 3, 2 << 8, "Študentska št. 2198390", -1, 0, 27, 27, "AIM ITS/04-023:2022 ECI 4 Example 1 **NOT SAME** different encodation, example Binary only, Zint uses Numeric also",
  1540. "111111100110101010001111111"
  1541. "100000000101110001100000001"
  1542. "101111100010101110101111101"
  1543. "101000000111000001000000101"
  1544. "101011100011001010001110101"
  1545. "101011101000010101001110101"
  1546. "101011100010111110001110101"
  1547. "000000001001010101100000000"
  1548. "000101110100111100110000000"
  1549. "010101001110000110101110000"
  1550. "101110101010011001101110000"
  1551. "111011011101010101111010000"
  1552. "001001101010101010101010011"
  1553. "101000000010011000110101010"
  1554. "010011111000100111010000101"
  1555. "010101110111110000001100100"
  1556. "101110111111000101110110011"
  1557. "010101110101100000100100000"
  1558. "000000011011010101011101000"
  1559. "000000001011110110100000000"
  1560. "111111100111001101001110101"
  1561. "000000100111001110101110101"
  1562. "111110100110101010001110101"
  1563. "000010100101010000000000101"
  1564. "111010101001110010001111101"
  1565. "111010101101010011000000001"
  1566. "111010100010001010001111111"
  1567. },
  1568. /* 26*/ { UNICODE_MODE, 4, 2, 5, 2 << 8, "Szczegółowe dane kontaktowe:+48 22 694 60 00", -1, 0, 31, 31, "AIM ITS/04-023:2022 ECI 4 Example 2 **NOT SAME** example corrupt??",
  1569. "1111111011101010101001001111111"
  1570. "1000000010001000010011100000001"
  1571. "1011111011011100100101101111101"
  1572. "1010000010010100011010000000101"
  1573. "1010111010000010111111001110101"
  1574. "1010111011000111011000101110101"
  1575. "1010111000111001111111101110101"
  1576. "0000000010100110011100100000000"
  1577. "0001100101001100101100101000000"
  1578. "1110111011110100011111011100110"
  1579. "1010011100110010011001000110101"
  1580. "1100110111101110101101111010000"
  1581. "1000011100001101011011000100000"
  1582. "1111110111100110010001000001010"
  1583. "1110110110110000010100001110110"
  1584. "1100110101001101001111100110000"
  1585. "1111111111111110101001110010101"
  1586. "0000000000000010100101001111000"
  1587. "1110001010001010011100001010001"
  1588. "0101010100110011101000101110111"
  1589. "0000101001101010101011010001000"
  1590. "1000111001101011000100111001001"
  1591. "0000001011011011100011010011000"
  1592. "0000000010001011100100100000000"
  1593. "1111111011101011101110001110101"
  1594. "0000001010111010111111101110101"
  1595. "1111101001001011010001101110101"
  1596. "0000101000010010001111100000101"
  1597. "1110101010101011000110101111101"
  1598. "1110101011111011001010100000001"
  1599. "1110101001101011111111101111111"
  1600. },
  1601. /* 27*/ { UNICODE_MODE, 5, 2, -1, 2 << 8, "Liĥtenŝtejno", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 5 Example 1 **NOT SAME** example uses Binary only, Zint uses Text mode also",
  1602. "11111110011010101111111"
  1603. "10000000010111100000001"
  1604. "10111110010110001111101"
  1605. "10100000110000100000101"
  1606. "10101110001101001110101"
  1607. "10101110101100101110101"
  1608. "10101110000010001110101"
  1609. "00000000110101000000000"
  1610. "00010101010101100000000"
  1611. "01010010000101010101100"
  1612. "10011100000111100111111"
  1613. "11101000110011110010000"
  1614. "00100111011111100000011"
  1615. "10001101101110111010110"
  1616. "00000000110100010101000"
  1617. "00000000010010100000000"
  1618. "11111110011011001110101"
  1619. "00000010110011101110101"
  1620. "11111010010100001110101"
  1621. "00001010101001100000101"
  1622. "11101010010000001111101"
  1623. "11101010110000000000001"
  1624. "11101010101010001111111"
  1625. },
  1626. /* 28*/ { UNICODE_MODE, 6, 2, -1, -1, "Lietuvą", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 6 Example 1 same",
  1627. "11111110011010101111111"
  1628. "10000000010101100000001"
  1629. "10111110001010001111101"
  1630. "10100000110011100000101"
  1631. "10101110001110001110101"
  1632. "10101110110101101110101"
  1633. "10101110001000001110101"
  1634. "00000000100011000000000"
  1635. "00010101001010100000000"
  1636. "01001100000101010101001"
  1637. "11011110100001001001111"
  1638. "01110001101010111111001"
  1639. "10011000100110101010100"
  1640. "11101111001110010001110"
  1641. "00000000101110010101000"
  1642. "00000000010111100000000"
  1643. "11111110000000001110101"
  1644. "00000010110101101110101"
  1645. "11111010001010001110101"
  1646. "00001010110011100000101"
  1647. "11101010000010001111101"
  1648. "11101010110101000000001"
  1649. "11101010101010001111111"
  1650. },
  1651. /* 29*/ { UNICODE_MODE, 7, 2, -1, -1, "Россия", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 7 Example 1 **NOT SAME** different encodation, figure uses Region One",
  1652. "11111110011010101111111"
  1653. "10000000010101100000001"
  1654. "10111110001010001111101"
  1655. "10100000110010100000101"
  1656. "10101110001100001110101"
  1657. "10101110110101101110101"
  1658. "10101110001010001110101"
  1659. "00000000110101000000000"
  1660. "00010101001010100000000"
  1661. "01010011100101010101010"
  1662. "11001011101001011101000"
  1663. "11110101001011011101110"
  1664. "10010011000001011011010"
  1665. "11101111101001011011110"
  1666. "00000000101010010101000"
  1667. "00000000010100100000000"
  1668. "11111110001010001110101"
  1669. "00000010110101101110101"
  1670. "11111010001011001110101"
  1671. "00001010111010100000101"
  1672. "11101010001010001111101"
  1673. "11101010110101000000001"
  1674. "11101010101010001111111"
  1675. },
  1676. /* 30*/ { UNICODE_MODE, 7, 2, -1, -1, "Монголулс", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 7 Example 2 same",
  1677. "11111110011010101111111"
  1678. "10000000010101100000001"
  1679. "10111110001010001111101"
  1680. "10100000110010100000101"
  1681. "10101110001100001110101"
  1682. "10101110110101101110101"
  1683. "10101110001010001110101"
  1684. "00000000110101000000000"
  1685. "00010101001010100000000"
  1686. "01011100111101010100100"
  1687. "11000101001001011100101"
  1688. "00011010001000011010100"
  1689. "11010000110101010111000"
  1690. "11101100111010111000110"
  1691. "00000000101001010101000"
  1692. "00000000001110100000000"
  1693. "11111110001010001110101"
  1694. "00000010101000101110101"
  1695. "11111010010100001110101"
  1696. "00001010110001100000101"
  1697. "11101010010010001111101"
  1698. "11101010111101000000001"
  1699. "11101010101010001111111"
  1700. },
  1701. /* 31*/ { UNICODE_MODE, 8, 2, -1, 4 << 8, "جواز السفر", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 8 Example 1 same with explicit mask 11 (auto 01)",
  1702. "11111110111101101111111"
  1703. "10000000100101000000001"
  1704. "10111110000100101111101"
  1705. "10100000110000100000101"
  1706. "10101110111110001110101"
  1707. "10101110100111001110101"
  1708. "10101110111001101110101"
  1709. "00000000100111100000000"
  1710. "00010101000111010000000"
  1711. "00010000101000111000001"
  1712. "11100100100110000001100"
  1713. "00000100010010010100110"
  1714. "00000001000101111001010"
  1715. "01010101110010100010001"
  1716. "00000001010110010101000"
  1717. "00000000101000100000000"
  1718. "11111110110001101110101"
  1719. "00000010000100101110101"
  1720. "11111010010010101110101"
  1721. "00001010111111100000101"
  1722. "11101010101010001111101"
  1723. "11101010010100100000001"
  1724. "11101010111010101111111"
  1725. },
  1726. /* 32*/ { UNICODE_MODE, 8, 2, -1, 3 << 8, "المنشأ: المملكة العربية السعودية", -1, 0, 29, 29, "AIM ITS/04-023:2022 ECI 8 Example 2 **NOT SAME** example corrupt??",
  1727. "11111110011000101001101111111"
  1728. "10000000100000000011100000001"
  1729. "10111110010110110011101111101"
  1730. "10100000001111011100100000101"
  1731. "10101110110000100010101110101"
  1732. "10101110010100001111001110101"
  1733. "10101110100101110100101110101"
  1734. "00000000101000111000000000000"
  1735. "00011000011111011010001000000"
  1736. "10111010110101111010001000101"
  1737. "10000011101101000000111100011"
  1738. "10001110000101100001010011001"
  1739. "11101110011011010101110111001"
  1740. "11000110011000100010110101000"
  1741. "11111111111111110101000111001"
  1742. "00000000000000111111000110100"
  1743. "10011011011100110001110111100"
  1744. "01100110101000110101101111100"
  1745. "01110000111010101101010100100"
  1746. "11110101000110111100100100100"
  1747. "00000010000110111111000011000"
  1748. "00000000000100100001100000000"
  1749. "11111110111000100100101110101"
  1750. "00000010011110110001001110101"
  1751. "11111010101010110110101110101"
  1752. "00001010101110101001000000101"
  1753. "11101010100100110000001111101"
  1754. "11101010100000110001100000001"
  1755. "11101010100100111111001111111"
  1756. },
  1757. /* 33*/ { UNICODE_MODE, 9, 1, -1, -1, "Μέρος #. α123", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 9 Example 1 **NOT SAME** example uses Binary only, Zint uses Numeric mode also",
  1758. "11111110011010001111111"
  1759. "10000000110101100000001"
  1760. "10111110001110101111101"
  1761. "10100000111100100000101"
  1762. "10101110001101101110101"
  1763. "10101110110110001110101"
  1764. "10101110010010001110101"
  1765. "00000000010101100000000"
  1766. "00010101000101011000000"
  1767. "10111111100010100101100"
  1768. "11001010101001000101101"
  1769. "01010001001011010101011"
  1770. "01010110101010001110110"
  1771. "01101001010101101001101"
  1772. "00000011001001010101000"
  1773. "00000000110010000000000"
  1774. "11111110011111001110101"
  1775. "00000010010010101110101"
  1776. "11111010101001001110101"
  1777. "00001010100101100000101"
  1778. "11101010101010001111101"
  1779. "11101010110010100000001"
  1780. "11101010001010001111111"
  1781. },
  1782. /* 34*/ { UNICODE_MODE, 10, 2, -1, -1, "דרכון", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 10 Example 1 same",
  1783. "11111110011010101111111"
  1784. "10000000010101100000001"
  1785. "10111110001010001111101"
  1786. "10100000111111100000101"
  1787. "10101110001100001110101"
  1788. "10101110110101101110101"
  1789. "10101110001010001110101"
  1790. "00000000110101000000000"
  1791. "00010101001010100000000"
  1792. "01010000101101010101011"
  1793. "01010101111101101101110"
  1794. "00101111101010010110110"
  1795. "00010111101001110100100"
  1796. "11111011010101001001111"
  1797. "00000000101010010101000"
  1798. "00000000010110100000000"
  1799. "11111110011000001110101"
  1800. "00000010100101101110101"
  1801. "11111010001011001110101"
  1802. "00001010111011100000101"
  1803. "11101010001010001111101"
  1804. "11101010110101000000001"
  1805. "11101010101010001111111"
  1806. },
  1807. /* 35*/ { UNICODE_MODE, 10, 2, 3, -1, "מספר חלק: A20200715001", -1, 0, 27, 27, "AIM ITS/04-023:2022 ECI 10 Example 2 **NOT SAME** example uses Binary only, Zint uses Numeric mode also",
  1808. "111111100110010010101111111"
  1809. "100000000001000001000000001"
  1810. "101111100111111110001111101"
  1811. "101000001000101000100000101"
  1812. "101011100000101000001110101"
  1813. "101011100111111111101110101"
  1814. "101011101011110001101110101"
  1815. "000000001101001001000000000"
  1816. "000101110011001101111000000"
  1817. "010010010011111000101100110"
  1818. "001001001001011000011110010"
  1819. "011000110111111111011011001"
  1820. "011101011001010010010011101"
  1821. "101100000111001001001001001"
  1822. "001111110011111000000000111"
  1823. "010010100100110010101100010"
  1824. "000010111000110110000110111"
  1825. "111111100101001101000011001"
  1826. "000000111001110010011101000"
  1827. "000000000001010101100000000"
  1828. "111111101011101100101110101"
  1829. "000000101100101011001110101"
  1830. "111110100001001000001110101"
  1831. "000010101101110100100000101"
  1832. "111010100000011010001111101"
  1833. "111010100001001101000000001"
  1834. "111010101001111111001111111"
  1835. },
  1836. /* 36*/ { UNICODE_MODE, 11, 2, 3, -1, "Amerika Birleşik Devletleri", -1, 0, 27, 27, "AIM ITS/04-023:2022 ECI 11 Example 1 **NOT SAME** example uses 2-byte Region mode",
  1837. "111111100110101011001111111"
  1838. "100000000110110010100000001"
  1839. "101111100000100000101111101"
  1840. "101000000110101110000000101"
  1841. "101011100011101100001110101"
  1842. "101011101011111110001110101"
  1843. "101011100000001101001110101"
  1844. "000000001101111110100000000"
  1845. "000101110011001111110000000"
  1846. "011010101010010101000000101"
  1847. "010100101010101111101001111"
  1848. "110011110101010101011101000"
  1849. "011000000111111010101010101"
  1850. "001010000110011101010101010"
  1851. "001001001001010110001000101"
  1852. "010100111110010011010101111"
  1853. "111110001011001100101011111"
  1854. "011011010100101011010110011"
  1855. "000000011010110001011101000"
  1856. "000000001010100110100000000"
  1857. "111111100110001100001110101"
  1858. "000000100101110100101110101"
  1859. "111110100000100111001110101"
  1860. "000010100001000101000000101"
  1861. "111010101100001101001111101"
  1862. "111010101000101000000000001"
  1863. "111010100111001010001111111"
  1864. },
  1865. /* 37*/ { UNICODE_MODE, 11, 2, 3, -1, "Biniş kartı #120921039", -1, 0, 27, 27, "AIM ITS/04-023:2022 ECI 11 Example 2 **NOT SAME** example uses Binary only, Zint uses Numeric mode also",
  1866. "111111100110101011001111111"
  1867. "100000000111001001100000001"
  1868. "101111100010101101101111101"
  1869. "101000000111101110000000101"
  1870. "101011100011010111001110101"
  1871. "101011101100010101001110101"
  1872. "101011100011101010001110101"
  1873. "000000001001010101100000000"
  1874. "000101110010101000110000000"
  1875. "010101001010010110000001011"
  1876. "001010101010000001111011100"
  1877. "100100101101010101000110111"
  1878. "100001101101101010101001101"
  1879. "110110110010110001010101010"
  1880. "101111101110010111100101101"
  1881. "010100000111001011011010101"
  1882. "010011001011101011101010010"
  1883. "010101001110111101110011111"
  1884. "000000011111001010011101000"
  1885. "000000001101010001100000000"
  1886. "111111100100101101001110101"
  1887. "000000100101011110101110101"
  1888. "111110100010101010001110101"
  1889. "000010100011100011000000101"
  1890. "111010101000110010001111101"
  1891. "111010101101011000000000001"
  1892. "111010100010101010001111111"
  1893. },
  1894. /* 38*/ { UNICODE_MODE, 12, 2, -1, 2 << 8, "Kūrybiškumą", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 12 Example 1 same with explicit mask 01 (auto 10)",
  1895. "11111110011010101111111"
  1896. "10000000010100100000001"
  1897. "10111110011100001111101"
  1898. "10100000101001100000101"
  1899. "10101110001101001110101"
  1900. "10101110110111101110101"
  1901. "10101110001010001110101"
  1902. "00000000110101000000000"
  1903. "00010101001010100000000"
  1904. "01011110000101010101111"
  1905. "01110101010101011001000"
  1906. "01010001110011100000101"
  1907. "10000100000010101110011"
  1908. "00010111110011110111100"
  1909. "00000000110000010101000"
  1910. "00000000011000100000000"
  1911. "11111110000000001110101"
  1912. "00000010110000101110101"
  1913. "11111010011100001110101"
  1914. "00001010101011100000101"
  1915. "11101010010111001111101"
  1916. "11101010111110000000001"
  1917. "11101010101010001111111"
  1918. },
  1919. /* 39*/ { UNICODE_MODE, 13, 2, -1, -1, "บาร๋แค่ด", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 13 Example 1 **NOT SAME** example uses Region One",
  1920. "11111110011010101111111"
  1921. "10000000010101100000001"
  1922. "10111110001010001111101"
  1923. "10100000111000100000101"
  1924. "10101110001100001110101"
  1925. "10101110110101101110101"
  1926. "10101110001010001110101"
  1927. "00000000110101000000000"
  1928. "00010101001010100000000"
  1929. "01011101111101010100111"
  1930. "11000010011100111100100"
  1931. "01101101101010101111111"
  1932. "11010111111110101001111"
  1933. "01110101000110110001110"
  1934. "00000000100010010101000"
  1935. "00000000000001100000000"
  1936. "11111110000100001110101"
  1937. "00000010101111101110101"
  1938. "11111010001011001110101"
  1939. "00001010101101100000101"
  1940. "11101010010010001111101"
  1941. "11101010110101000000001"
  1942. "11101010101010001111111"
  1943. },
  1944. /* 40*/ { UNICODE_MODE, 15, 2, -1, -1, "uzņēmums", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 15 Example 1 same",
  1945. "11111110011010101111111"
  1946. "10000000010101100000001"
  1947. "10111110001010001111101"
  1948. "10100000111010100000101"
  1949. "10101110001100001110101"
  1950. "10101110110101101110101"
  1951. "10101110001010001110101"
  1952. "00000000110101000000000"
  1953. "00010101001010100000000"
  1954. "01011101001101010100000"
  1955. "00011011100001111101110"
  1956. "11011001111010111010010"
  1957. "01000101000000110000010"
  1958. "11000000000000101001101"
  1959. "00000000100111010101000"
  1960. "00000000011001100000000"
  1961. "11111110011010001110101"
  1962. "00000010101100101110101"
  1963. "11111010011011001110101"
  1964. "00001010100110100000101"
  1965. "11101010000010001111101"
  1966. "11101010110101000000001"
  1967. "11101010101010001111111"
  1968. },
  1969. /* 41*/ { UNICODE_MODE, 16, 2, -1, -1, "ṁórṡáċ", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 16 Example 1 same with explicit mask 11 (auto 10)",
  1970. "11111110011001001111111"
  1971. "10000000000000000000001"
  1972. "10111110011111101111101"
  1973. "10100000001001000000101"
  1974. "10101110000010001110101"
  1975. "10101110011111001110101"
  1976. "10101110101001101110101"
  1977. "00000000100100100000000"
  1978. "00010101011111101000000"
  1979. "01001111100001001000011"
  1980. "11011111001010111111110"
  1981. "10011011010101010101000"
  1982. "10110111010001001010010"
  1983. "11111000110000111101001"
  1984. "00000010111111010101000"
  1985. "00000000101001100000000"
  1986. "11111110100111101110101"
  1987. "00000010011111001110101"
  1988. "11111010001000001110101"
  1989. "00001010001100000000101"
  1990. "11101010101111001111101"
  1991. "11101010001001000000001"
  1992. "11101010000100001111111"
  1993. },
  1994. /* 42*/ { UNICODE_MODE, 17, -1, -1, 2 << 8, "Price: €13.50", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 17 Example 1 same with explicit mask 01 (auto 10)",
  1995. "11111110011010101111111"
  1996. "10000000010011100000001"
  1997. "10111110000110001111101"
  1998. "10100000100100100000101"
  1999. "10101110001100001110101"
  2000. "10101110101001101110101"
  2001. "10101110000010001110101"
  2002. "00000000110101000000000"
  2003. "00010101011111100000000"
  2004. "01111000000001010100010"
  2005. "10010100011100111001100"
  2006. "10010111000010001010110"
  2007. "11000100111100100000110"
  2008. "00010010111101100110110"
  2009. "00000000101010010101000"
  2010. "00000000000011100000000"
  2011. "11111110001010001110101"
  2012. "00000010100111101110101"
  2013. "11111010001000001110101"
  2014. "00001010111100100000101"
  2015. "11101010011110001111101"
  2016. "11101010111100000000001"
  2017. "11101010101010001111111"
  2018. },
  2019. /* 43*/ { UNICODE_MODE, 18, -1, -1, -1, "Te słowa są głębokie", -1, 0, 25, 25, "AIM ITS/04-023:2022 ECI 18 Example 1 **NOT SAME** example uses Binary only, Zint uses Text mode also",
  2020. "1111111001000000101111111"
  2021. "1000000011100111000000001"
  2022. "1011111010111110001111101"
  2023. "1010000010100010100000101"
  2024. "1010111010011000101110101"
  2025. "1010111001000101001110101"
  2026. "1010111000011110101110101"
  2027. "0000000010000000100000000"
  2028. "0001011000000001100000000"
  2029. "1001101110111101000111101"
  2030. "0110011010100011100111111"
  2031. "0111010001010011110100100"
  2032. "0100110000001101001011001"
  2033. "0010010011101100101011111"
  2034. "0100100110111101011010001"
  2035. "0000111101101010001010001"
  2036. "0000000010110111001101000"
  2037. "0000000010111111100000000"
  2038. "1111111011000000001110101"
  2039. "0000001000000000001110101"
  2040. "1111101010010010101110101"
  2041. "0000101010000000100000101"
  2042. "1110101000000001101111101"
  2043. "1110101001010000100000001"
  2044. "1110101011100000001111111"
  2045. },
  2046. /* 44*/ { UNICODE_MODE, 20, -1, -1, -1, "バーコード", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 20 Example 1 **NOT SAME** example uses 2-byte Region mode",
  2047. "11111110011010101111111"
  2048. "10000000010000100000001"
  2049. "10111110001010001111101"
  2050. "10100000110001100000101"
  2051. "10101110001100001110101"
  2052. "10101110110101101110101"
  2053. "10101110001010001110101"
  2054. "00000000110101000000000"
  2055. "00010101001010100000000"
  2056. "01011111110101010101011"
  2057. "00010111001011010110100"
  2058. "01100101000001111001101"
  2059. "11011011010000101100000"
  2060. "00011110011111011101111"
  2061. "00000000101011010101000"
  2062. "00000000011111100000000"
  2063. "11111110011000001110101"
  2064. "00000010101000101110101"
  2065. "11111010010010001110101"
  2066. "00001010100001100000101"
  2067. "11101010010010001111101"
  2068. "11101010101110000000001"
  2069. "11101010101010001111111"
  2070. },
  2071. /* 45*/ { UNICODE_MODE, 20, -1, -1, -1, "東京都", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 20 Example 2 **NOT SAME** example uses 2-byte Region mode",
  2072. "11111110111010001111111"
  2073. "10000000110000000000001"
  2074. "10111110100100101111101"
  2075. "10100000110001000000101"
  2076. "10101110001101001110101"
  2077. "10101110110111001110101"
  2078. "10101110000010001110101"
  2079. "00000000010101000000000"
  2080. "00010101111001110000000"
  2081. "01110011110011001010011"
  2082. "01101110110011001110101"
  2083. "10010111101100111000001"
  2084. "01111011101110001100010"
  2085. "01010100011001011011011"
  2086. "00000001101010110101000"
  2087. "00000000010110000000000"
  2088. "11111110000101001110101"
  2089. "00000010010101101110101"
  2090. "11111010001011001110101"
  2091. "00001010000010100000101"
  2092. "11101010111010101111101"
  2093. "11101010010101100000001"
  2094. "11101010001010101111111"
  2095. },
  2096. /* 46*/ { UNICODE_MODE, 21, -1, -1, -1, "Študentska št. 2198390", -1, 0, 25, 25, "AIM ITS/04-023:2022 ECI 21 Example 1 **NOT SAME** different encodation, example Binary only, Zint uses Numeric also",
  2097. "1111111001000000101111111"
  2098. "1000000011000010000000001"
  2099. "1011111010111101001111101"
  2100. "1010000010000101100000101"
  2101. "1010111010011000101110101"
  2102. "1010111000010010001110101"
  2103. "1010111000100000101110101"
  2104. "0000000010000000100000000"
  2105. "0001011001101001100000000"
  2106. "1110101110111110010100001"
  2107. "1111010001010011011100011"
  2108. "0011001101000110000000000"
  2109. "0001011010101110011011100"
  2110. "0001100100011011110100011"
  2111. "0010001010110011100011000"
  2112. "0010111001100000001110110"
  2113. "0000000011010100001101000"
  2114. "0000000010111111100000000"
  2115. "1111111011110011001110101"
  2116. "0000001001010110001110101"
  2117. "1111101010110111101110101"
  2118. "0000101010000000100000101"
  2119. "1110101000101101101111101"
  2120. "1110101001011010100000001"
  2121. "1110101010000000001111111"
  2122. },
  2123. /* 47*/ { UNICODE_MODE, 22, 2, -1, -1, "Россия", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 22 Example 1 same",
  2124. "11111110011010101111111"
  2125. "10000000010001100000001"
  2126. "10111110001010001111101"
  2127. "10100000110011100000101"
  2128. "10101110001100001110101"
  2129. "10101110110101101110101"
  2130. "10101110001010001110101"
  2131. "00000000110101000000000"
  2132. "00010101001010100000000"
  2133. "01010011100101010100010"
  2134. "11010000100111011101011"
  2135. "01101001001010111101000"
  2136. "10010110010001111011010"
  2137. "11010000101001001110110"
  2138. "00000000101010010101000"
  2139. "00000000010101100000000"
  2140. "11111110010010001110101"
  2141. "00000010100101101110101"
  2142. "11111010001010001110101"
  2143. "00001010100100100000101"
  2144. "11101010011010001111101"
  2145. "11101010110101000000001"
  2146. "11101010101010001111111"
  2147. },
  2148. /* 48*/ { UNICODE_MODE, 22, 2, -1, 4 << 8, "Монголулс", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 22 Example 1 same with explicit mask 11 (auto 01)",
  2149. "11111110111101101111111"
  2150. "10000000100011000000001"
  2151. "10111110000000101111101"
  2152. "10100000111110100000101"
  2153. "10101110111110001110101"
  2154. "10101110100111001110101"
  2155. "10101110111001101110101"
  2156. "00000000100111100000000"
  2157. "00010101000111010000000"
  2158. "00010011101000111000001"
  2159. "11101101011010110000110"
  2160. "00100110110000100110100"
  2161. "00111010101011100101000"
  2162. "10111001000010101001100"
  2163. "00000001000001010101000"
  2164. "00000000101111100000000"
  2165. "11111110111100101110101"
  2166. "00000010001000101110101"
  2167. "11111010010010101110101"
  2168. "00001010111110100000101"
  2169. "11101010111110001111101"
  2170. "11101010010010100000001"
  2171. "11101010111010101111111"
  2172. },
  2173. /* 49*/ { UNICODE_MODE, 23, 2, -1, 4 << 8, "bœuf", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 23 Example 1 same with explicit mask 11 (auto 01)",
  2174. "11111110111101101111111"
  2175. "10000000100011000000001"
  2176. "10111110000000101111101"
  2177. "10100000111111100000101"
  2178. "10101110111110001110101"
  2179. "10101110100111001110101"
  2180. "10101110111001101110101"
  2181. "00000000100111100000000"
  2182. "00010101000111010000000"
  2183. "00011110000000111000110"
  2184. "11010001010000100100101"
  2185. "01010000111001110101100"
  2186. "10000101100110111000111"
  2187. "10010101101101000010101"
  2188. "00000001010010010101000"
  2189. "00000000110001100000000"
  2190. "11111110100001101110101"
  2191. "00000010001101101110101"
  2192. "11111010001100101110101"
  2193. "00001010101010100000101"
  2194. "11101010101010001111101"
  2195. "11101010011010100000001"
  2196. "11101010111010101111111"
  2197. },
  2198. /* 50*/ { UNICODE_MODE, 24, -1, -1, -1, "جواز السفر", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 24 Example 1 same",
  2199. "11111110011010101111111"
  2200. "10000000010011100000001"
  2201. "10111110001110001111101"
  2202. "10100000111101100000101"
  2203. "10101110001100001110101"
  2204. "10101110110101101110101"
  2205. "10101110001010001110101"
  2206. "00000000110101000000000"
  2207. "00010101001010100000000"
  2208. "01011111100101010101100"
  2209. "11011100000110011100110"
  2210. "00000100101000111100000"
  2211. "11101101011101101011001"
  2212. "10001111001010111010010"
  2213. "00000000101011010101000"
  2214. "00000000001110100000000"
  2215. "11111110000011001110101"
  2216. "00000010101100101110101"
  2217. "11111010010110001110101"
  2218. "00001010100010100000101"
  2219. "11101010011101001111101"
  2220. "11101010111011000000001"
  2221. "11101010101010001111111"
  2222. },
  2223. /* 51*/ { UNICODE_MODE, 24, 2, -1, 4 << 8, "المنشأ: المملكة العربية السعودية", -1, 0, 29, 29, "AIM ITS/04-023:2022 ECI 24 Example 2 **NOT SAME** example corrupt??",
  2224. "11111110111100101100001111111"
  2225. "10000000000110001000100000001"
  2226. "10111110001001001000101111101"
  2227. "10100000101110010100000000101"
  2228. "10101110011100000000101110101"
  2229. "10101110100000110111001110101"
  2230. "10101110110100010001101110101"
  2231. "00000000110101010111000000000"
  2232. "00011000000111100011110000000"
  2233. "11101001100100010100111001011"
  2234. "10010100011100101100010100000"
  2235. "10111010010101011001101010010"
  2236. "11001010111100100101100111010"
  2237. "11100110010001000001001010100"
  2238. "11111111111111101011011111101"
  2239. "00000000000000111110110111000"
  2240. "00101111100100110110010100000"
  2241. "11110110100010101001111111011"
  2242. "01110101111110101010111010001"
  2243. "00010110101110110101000111100"
  2244. "00000001101000100010000011000"
  2245. "00000000010110111010100000000"
  2246. "11111110100110110010101110101"
  2247. "00000010000110110010101110101"
  2248. "11111010100110110010001110101"
  2249. "00001010001010110001100000101"
  2250. "11101010111110101011001111101"
  2251. "11101010111110110010000000001"
  2252. "11101010011000111111101111111"
  2253. },
  2254. /* 52*/ { UNICODE_MODE, 25, 2, -1, -1, "条码", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 25 Example 1 same",
  2255. "11111110011010101111111"
  2256. "10000000010001100000001"
  2257. "10111110001010001111101"
  2258. "10100000111100100000101"
  2259. "10101110001110001110101"
  2260. "10101110110101101110101"
  2261. "10101110001111001110101"
  2262. "00000000111111000000000"
  2263. "00010101001010100000000"
  2264. "01011100100101010100101"
  2265. "01001100010110101101010"
  2266. "01000010110100011111110"
  2267. "10101011110111101010101"
  2268. "10011011010101010011010"
  2269. "00000000101010010101000"
  2270. "00000000010110100000000"
  2271. "11111110010010001110101"
  2272. "00000010100101101110101"
  2273. "11111010001011001110101"
  2274. "00001010111101100000101"
  2275. "11101010011010001111101"
  2276. "11101010110101000000001"
  2277. "11101010101010001111111"
  2278. },
  2279. /* 53*/ { UNICODE_MODE, 25, 2, -1, 3 << 8, "バーコード", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 25 Example 2 same with explicit mask 10 (auto 01)",
  2280. "11111110011001001111111"
  2281. "10000000000001000000001"
  2282. "10111110011011101111101"
  2283. "10100000000000000000101"
  2284. "10101110000010001110101"
  2285. "10101110011111001110101"
  2286. "10101110101001101110101"
  2287. "00000000100100100000000"
  2288. "00010101011111101000000"
  2289. "01000011000001001000001"
  2290. "01000100001010100101101"
  2291. "00101011110000010011100"
  2292. "11001101110000101000010"
  2293. "10100011101000011101100"
  2294. "00000010101111010101000"
  2295. "00000000110100100000000"
  2296. "11111110101100101110101"
  2297. "00000010000001001110101"
  2298. "11111010001011001110101"
  2299. "00001010010001000000101"
  2300. "11101010100011001111101"
  2301. "11101010001111000000001"
  2302. "11101010000100001111111"
  2303. },
  2304. /* 54*/ { UNICODE_MODE, 25, 2, -1, -1, "바코드", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 25 Example 3 same",
  2305. "11111110111101101111111"
  2306. "10000000100011000000001"
  2307. "10111110000000101111101"
  2308. "10100000110001100000101"
  2309. "10101110111110001110101"
  2310. "10101110100111001110101"
  2311. "10101110111001101110101"
  2312. "00000000100111100000000"
  2313. "00010101000111010000000"
  2314. "00011100110000111001001"
  2315. "10010001101101100001010"
  2316. "00000110011010011110010"
  2317. "11010011101001010001011"
  2318. "01110110011101000101111"
  2319. "00000001010010010101000"
  2320. "00000000110010100000000"
  2321. "11111110101100101110101"
  2322. "00000010011101101110101"
  2323. "11111010001101101110101"
  2324. "00001010100001100000101"
  2325. "11101010110010001111101"
  2326. "11101010011010100000001"
  2327. "11101010111010101111111"
  2328. },
  2329. /* 55*/ { UNICODE_MODE, 26, 2, -1, -1, "条码", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 26 Example 1 **NOT SAME** example uses 2-byte Region mode",
  2330. "11111110111101101111111"
  2331. "10000000100011000000001"
  2332. "10111110000000101111101"
  2333. "10100000110010100000101"
  2334. "10101110111110001110101"
  2335. "10101110100111001110101"
  2336. "10101110111001101110101"
  2337. "00000000100111100000000"
  2338. "00010101000111010000000"
  2339. "00011100100000111000100"
  2340. "11010111111100101010011"
  2341. "00100101110001101011100"
  2342. "10110011001100111001110"
  2343. "11110111101001011011011"
  2344. "00000001010010010101000"
  2345. "00000000110010100000000"
  2346. "11111110100001101110101"
  2347. "00000010011101101110101"
  2348. "11111010001100101110101"
  2349. "00001010100010100000101"
  2350. "11101010100010001111101"
  2351. "11101010011010100000001"
  2352. "11101010111010101111111"
  2353. },
  2354. /* 56*/ { UNICODE_MODE, 26, 2, -1, 4 << 8, "バーコード", -1, 0, 25, 25, "AIM ITS/04-023:2022 ECI 26 Example 2 same with explicit mask 11 (auto 01)",
  2355. "1111111001110110001111111"
  2356. "1000000011011011100000001"
  2357. "1011111010000100101111101"
  2358. "1010000001001001000000101"
  2359. "1010111011111000101110101"
  2360. "1010111011101011101110101"
  2361. "1010111011010000001110101"
  2362. "0000000010011100000000000"
  2363. "0001011001101111101000000"
  2364. "1001110101011100000000000"
  2365. "0001111101100000011010101"
  2366. "0111100110000100111000011"
  2367. "1101001110100111100011110"
  2368. "1010011101010100011101110"
  2369. "0101000110011010011101100"
  2370. "0000110010101001100100011"
  2371. "0000001011001010001101000"
  2372. "0000000001110110100000000"
  2373. "1111111000110101101110101"
  2374. "0000001011000010101110101"
  2375. "1111101011100011101110101"
  2376. "0000101001101001000000101"
  2377. "1110101010100110101111101"
  2378. "1110101011110011100000001"
  2379. "1110101001010110001111111"
  2380. },
  2381. /* 57*/ { UNICODE_MODE, 26, 2, -1, -1, "바코드", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 26 Example 3 same",
  2382. "11111110111101101111111"
  2383. "10000000100011000000001"
  2384. "10111110000000101111101"
  2385. "10100000110010100000101"
  2386. "10101110111110001110101"
  2387. "10101110100111001110101"
  2388. "10101110111001101110101"
  2389. "00000000100111100000000"
  2390. "00010101000111010000000"
  2391. "00010011100000111000010"
  2392. "01000110110001000011011"
  2393. "00111000100000111100001"
  2394. "11010011001010000011111"
  2395. "11001010111110101001011"
  2396. "00000001011001010101000"
  2397. "00000000100001100000000"
  2398. "11111110111010101110101"
  2399. "00000010010100101110101"
  2400. "11111010010100101110101"
  2401. "00001010101111100000101"
  2402. "11101010101101001111101"
  2403. "11101010011010100000001"
  2404. "11101010111010101111111"
  2405. },
  2406. /* 58*/ { UNICODE_MODE, 27, 2, -1, 3 << 8, "sn:7QPB4MN", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 27 Example 1 same with explicit mask 10 (auto 11)",
  2407. "11111110011001001111111"
  2408. "10000000000000000000001"
  2409. "10111110011111101111101"
  2410. "10100000000010000000101"
  2411. "10101110000000001110101"
  2412. "10101110011111001110101"
  2413. "10101110101111101110101"
  2414. "00000000111111100000000"
  2415. "00010101011111101000000"
  2416. "01001010110001001000011"
  2417. "11100001011011011100101"
  2418. "11001100010011101001101"
  2419. "00101100011010000010001"
  2420. "01011110000110001100110"
  2421. "00000010101101010101000"
  2422. "00000000110110100000000"
  2423. "11111110110101101110101"
  2424. "00000010000000001110101"
  2425. "11111010010001001110101"
  2426. "00001010000001000000101"
  2427. "11101010101111001111101"
  2428. "11101010001001000000001"
  2429. "11101010000100001111111"
  2430. },
  2431. /* 59*/ { UNICODE_MODE, 28, 2, -1, -1, "條碼", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 28 Example 1 same",
  2432. "11111110011010101111111"
  2433. "10000000010001100000001"
  2434. "10111110001010001111101"
  2435. "10100000111001100000101"
  2436. "10101110001100001110101"
  2437. "10101110110101101110101"
  2438. "10101110001010001110101"
  2439. "00000000110101000000000"
  2440. "00010101001010100000000"
  2441. "01010001111101010100010"
  2442. "01011000111101101111111"
  2443. "00010010000000001010101"
  2444. "10101001011010101010101"
  2445. "01100111010101011001010"
  2446. "00000000101010010101000"
  2447. "00000000010111100000000"
  2448. "11111110011010001110101"
  2449. "00000010100101101110101"
  2450. "11111010001010001110101"
  2451. "00001010111011100000101"
  2452. "11101010011010001111101"
  2453. "11101010110101000000001"
  2454. "11101010101010001111111"
  2455. },
  2456. /* 60*/ { UNICODE_MODE, 29, 2, -1, -1, "条码", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 29 Example 1 same",
  2457. "11111110011010101111111"
  2458. "10000000010001100000001"
  2459. "10111110001010001111101"
  2460. "10100000111000100000101"
  2461. "10101110000010001110101"
  2462. "10101110110101101110101"
  2463. "10101110001111001110101"
  2464. "00000000111100000000000"
  2465. "00010101001010100000000"
  2466. "01001101100101010100100"
  2467. "11000011111001010101010"
  2468. "11001010110100101101110"
  2469. "10101000001100101010100"
  2470. "11011011010101000101111"
  2471. "00000000101010010101000"
  2472. "00000000010111100000000"
  2473. "11111110011001001110101"
  2474. "00000010100101101110101"
  2475. "11111010001011001110101"
  2476. "00001010110100100000101"
  2477. "11101010001010001111101"
  2478. "11101010110101000000001"
  2479. "11101010101010001111111"
  2480. },
  2481. /* 61*/ { UNICODE_MODE, 29, 2, -1, -1, "北京", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 29 Example 2 same",
  2482. "11111110011010101111111"
  2483. "10000000010001100000001"
  2484. "10111110001010001111101"
  2485. "10100000111000100000101"
  2486. "10101110000010001110101"
  2487. "10101110110101101110101"
  2488. "10101110001010001110101"
  2489. "00000000110011000000000"
  2490. "00010101001010100000000"
  2491. "01001001111101010101000"
  2492. "01101101100001010101011"
  2493. "00011010110101110011010"
  2494. "10101010111001101010100"
  2495. "00010101010101010101001"
  2496. "00000000101010010101000"
  2497. "00000000010111100000000"
  2498. "11111110011101001110101"
  2499. "00000010100101101110101"
  2500. "11111010001010001110101"
  2501. "00001010100011100000101"
  2502. "11101010010010001111101"
  2503. "11101010110101000000001"
  2504. "11101010101010001111111"
  2505. },
  2506. /* 62*/ { UNICODE_MODE, 30, 2, -1, -1, "바코드", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 30 Example 1 **NOT SAME** example uses Region One mode",
  2507. "11111110011010101111111"
  2508. "10000000010001100000001"
  2509. "10111110001010001111101"
  2510. "10100000111011100000101"
  2511. "10101110001100001110101"
  2512. "10101110110101101110101"
  2513. "10101110001010001110101"
  2514. "00000000110101000000000"
  2515. "00010101001010100000000"
  2516. "01010011111101010100110"
  2517. "01001111011001100100100"
  2518. "11011100011000100010101"
  2519. "11111111001110000001010"
  2520. "01111101000001011100010"
  2521. "00000000101010010101000"
  2522. "00000000010101100000000"
  2523. "11111110001111001110101"
  2524. "00000010100101101110101"
  2525. "11111010001011001110101"
  2526. "00001010100001100000101"
  2527. "11101010010010001111101"
  2528. "11101010110101000000001"
  2529. "11101010101010001111111"
  2530. },
  2531. /* 63*/ { UNICODE_MODE, 30, 2, -1, ZINT_FULL_MULTIBYTE | (4 << 8), "바코드", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 30 Example 1 same with FULL_MULTIBYTE and explicit mask 11 (auto 01)",
  2532. "11111110111101101111111"
  2533. "10000000100011000000001"
  2534. "10111110000000101111101"
  2535. "10100000110110100000101"
  2536. "10101110110000001110101"
  2537. "10101110100111001110101"
  2538. "10101110111000101110101"
  2539. "00000000111111100000000"
  2540. "00010101000111010000000"
  2541. "00010110100000111001110"
  2542. "10000101011111100110110"
  2543. "11100000110001000100111"
  2544. "10111011100001111000111"
  2545. "11010111101101010101000"
  2546. "00000001010010010101000"
  2547. "00000000110011100000000"
  2548. "11111110100101101110101"
  2549. "00000010011101101110101"
  2550. "11111010001100101110101"
  2551. "00001010110010100000101"
  2552. "11101010100010001111101"
  2553. "11101010011010100000001"
  2554. "11101010111010101111111"
  2555. },
  2556. /* 64*/ { UNICODE_MODE, 30, 2, -1, -1, "서울", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 30 Example 2 **NOT SAME** example uses Region One mode",
  2557. "11111110011010101111111"
  2558. "10000000010001100000001"
  2559. "10111110001010001111101"
  2560. "10100000111011100000101"
  2561. "10101110001100001110101"
  2562. "10101110110101101110101"
  2563. "10101110001010001110101"
  2564. "00000000110101000000000"
  2565. "00010101001010100000000"
  2566. "01010001111101010100100"
  2567. "11110001000111000111110"
  2568. "10111010101011100100011"
  2569. "01001011010111101010100"
  2570. "00111111010101000101101"
  2571. "00000000101010010101000"
  2572. "00000000010100100000000"
  2573. "11111110010100001110101"
  2574. "00000010100101101110101"
  2575. "11111010001010001110101"
  2576. "00001010101011100000101"
  2577. "11101010000010001111101"
  2578. "11101010110101000000001"
  2579. "11101010101010001111111"
  2580. },
  2581. /* 65*/ { UNICODE_MODE, 30, 2, -1, ZINT_FULL_MULTIBYTE, "서울", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 30 Example 2 same with FULL_MULTIBYTE",
  2582. "11111110011010101111111"
  2583. "10000000010001100000001"
  2584. "10111110001010001111101"
  2585. "10100000111011100000101"
  2586. "10101110000010001110101"
  2587. "10101110110101101110101"
  2588. "10101110001000001110101"
  2589. "00000000110010000000000"
  2590. "00010101001010100000000"
  2591. "01011101111101010100111"
  2592. "10101111100101010101111"
  2593. "11000010110101111101010"
  2594. "10101001001000101010101"
  2595. "11111001010101000101000"
  2596. "00000000101010010101000"
  2597. "00000000010110100000000"
  2598. "11111110001001001110101"
  2599. "00000010100101101110101"
  2600. "11111010001011001110101"
  2601. "00001010111101100000101"
  2602. "11101010011010001111101"
  2603. "11101010110101000000001"
  2604. "11101010101010001111111"
  2605. },
  2606. /* 66*/ { UNICODE_MODE, 31, 2, -1, 2 << 8, "条码", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 31 Example 1 same with explicit mask 01 (auto 11)",
  2607. "11111110011010101111111"
  2608. "10000000010001100000001"
  2609. "10111110001010001111101"
  2610. "10100000111010100000101"
  2611. "10101110000010001110101"
  2612. "10101110110101101110101"
  2613. "10101110001111001110101"
  2614. "00000000111100000000000"
  2615. "00010101001010100000000"
  2616. "01001101100101010100100"
  2617. "11001100011101010101101"
  2618. "00000010110101101011010"
  2619. "10101001000001101010100"
  2620. "01010111010101001011110"
  2621. "00000000101010010101000"
  2622. "00000000010111100000000"
  2623. "11111110001100001110101"
  2624. "00000010110101101110101"
  2625. "11111010001011001110101"
  2626. "00001010101101100000101"
  2627. "11101010011010001111101"
  2628. "11101010110101000000001"
  2629. "11101010101010001111111"
  2630. },
  2631. /* 67*/ { UNICODE_MODE, 31, 2, -1, 4 << 8, "北京", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 31 Example 2 same with explicit mask 11 (auto 10)",
  2632. "11111110111101101111111"
  2633. "10000000100011000000001"
  2634. "10111110000000101111101"
  2635. "10100000110111100000101"
  2636. "10101110110000001110101"
  2637. "10101110100111001110101"
  2638. "10101110111001101110101"
  2639. "00000000100001100000000"
  2640. "00010101000111010000000"
  2641. "00000110110000111000101"
  2642. "01010010110000111000010"
  2643. "01000010001110100111100"
  2644. "01000100110000111000110"
  2645. "00001011101101001001010"
  2646. "00000001010010010101000"
  2647. "00000000110000100000000"
  2648. "11111110110000101110101"
  2649. "00000010001101101110101"
  2650. "11111010001101101110101"
  2651. "00001010100010100000101"
  2652. "11101010111010001111101"
  2653. "11101010011010100000001"
  2654. "11101010111010101111111"
  2655. },
  2656. /* 68*/ { UNICODE_MODE, 31, 2, -1, -1, "條碼", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 31 Example 3 **NOT SAME** example uses 2-byte Region mode, Zint binary (same bit count)",
  2657. "11111110011001001111111"
  2658. "10000000000000000000001"
  2659. "10111110011111101111101"
  2660. "10100000000110000000101"
  2661. "10101110000010001110101"
  2662. "10101110011111001110101"
  2663. "10101110101001101110101"
  2664. "00000000100100100000000"
  2665. "00010101011111101000000"
  2666. "01001101101001001000010"
  2667. "10011010011001000001111"
  2668. "01010010111001010010011"
  2669. "01101000101111001001000"
  2670. "00100100100100101100100"
  2671. "00000010111111010101000"
  2672. "00000000101011100000000"
  2673. "11111110110011101110101"
  2674. "00000010001111001110101"
  2675. "11111010001000001110101"
  2676. "00001010010101000000101"
  2677. "11101010101111001111101"
  2678. "11101010001001000000001"
  2679. "11101010000100001111111"
  2680. },
  2681. /* 69*/ { UNICODE_MODE, 32, 2, -1, 2 << 8, "条码", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 32 Example 1 same with explicit mask 01 (auto 10)",
  2682. "11111110011010101111111"
  2683. "10000000011101100000001"
  2684. "10111110001010001111101"
  2685. "10100000110101100000101"
  2686. "10101110000010001110101"
  2687. "10101110110101101110101"
  2688. "10101110001111001110101"
  2689. "00000000111100000000000"
  2690. "00010101001010100000000"
  2691. "01001101100101010100100"
  2692. "11001100001101010101110"
  2693. "10000010110100001100110"
  2694. "10101010111000101010100"
  2695. "10110111010101010101110"
  2696. "00000000101010010101000"
  2697. "00000000010101100000000"
  2698. "11111110000100001110101"
  2699. "00000010100101101110101"
  2700. "11111010001010001110101"
  2701. "00001010100110100000101"
  2702. "11101010010010001111101"
  2703. "11101010110101000000001"
  2704. "11101010101010001111111"
  2705. },
  2706. /* 70*/ { UNICODE_MODE, 32, 2, -1, 4 << 8, "北京", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 32 Example 2 same with explicit mask 11 (auto 01)",
  2707. "11111110111101101111111"
  2708. "10000000101111000000001"
  2709. "10111110000000101111101"
  2710. "10100000111000100000101"
  2711. "10101110110000001110101"
  2712. "10101110100111001110101"
  2713. "10101110111001101110101"
  2714. "00000000100001100000000"
  2715. "00010101000111010000000"
  2716. "00000110110000111000101"
  2717. "01010010100000111000001"
  2718. "11000010001111000000000"
  2719. "01000111001001111000110"
  2720. "11101011101101010111010"
  2721. "00000001010010010101000"
  2722. "00000000110010100000000"
  2723. "11111110111000101110101"
  2724. "00000010011101101110101"
  2725. "11111010001100101110101"
  2726. "00001010101001100000101"
  2727. "11101010110010001111101"
  2728. "11101010011010100000001"
  2729. "11101010111010101111111"
  2730. },
  2731. /* 71*/ { UNICODE_MODE, 32, 2, -1, -1, "條碼", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 32 Example 3 **NOT SAME** example uses 2-byte Region mode, Zint binary (same bit count)",
  2732. "11111110011001001111111"
  2733. "10000000001100000000001"
  2734. "10111110011111101111101"
  2735. "10100000001001000000101"
  2736. "10101110000010001110101"
  2737. "10101110011111001110101"
  2738. "10101110101001101110101"
  2739. "00000000100100100000000"
  2740. "00010101011111101000000"
  2741. "01001101101001001000010"
  2742. "10011010001001000001100"
  2743. "11010010111000110101111"
  2744. "01101011010110001001000"
  2745. "11000100100100110010100"
  2746. "00000010111111010101000"
  2747. "00000000101001100000000"
  2748. "11111110111011101110101"
  2749. "00000010011111001110101"
  2750. "11111010001001001110101"
  2751. "00001010011110000000101"
  2752. "11101010100111001111101"
  2753. "11101010001001000000001"
  2754. "11101010000100001111111"
  2755. },
  2756. /* 72*/ { UNICODE_MODE, 32, 2, -1, 2 << 8, "པེ་ཅིང།", -1, 0, 25, 25, "AIM ITS/04-023:2022 ECI 32 Example 4 same with explicit mask 01 (auto 10)",
  2757. "1111111011101011001111111"
  2758. "1000000001011100000000001"
  2759. "1011111011000010001111101"
  2760. "1010000001100101000000101"
  2761. "1010111000010001101110101"
  2762. "1010111010010111001110101"
  2763. "1010111000111110101110101"
  2764. "0000000011010101100000000"
  2765. "0001011000101001011000000"
  2766. "1100000111101101110000000"
  2767. "1011110000011001100100100"
  2768. "0001110001010101010100111"
  2769. "1001111001001100100011111"
  2770. "0011111011011001101101011"
  2771. "0101011010101010101111010"
  2772. "0101011000100010111101111"
  2773. "0000001101110001001101000"
  2774. "0000000011111011100000000"
  2775. "1111111010101100001110101"
  2776. "0000001000111010101110101"
  2777. "1111101011101010001110101"
  2778. "0000101001010101000000101"
  2779. "1110101000101101101111101"
  2780. "1110101001100100000000001"
  2781. "1110101001001010101111111"
  2782. },
  2783. /* 73*/ { UNICODE_MODE, 32, 2, -1, -1, "バーコード", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 32 Example 5 same",
  2784. "11111110111101101111111"
  2785. "10000000101100000000001"
  2786. "10111110000000101111101"
  2787. "10100000111000100000101"
  2788. "10101110110100001110101"
  2789. "10101110100111001110101"
  2790. "10101110111000101110101"
  2791. "00000000110001100000000"
  2792. "00010101000111010000000"
  2793. "00001011101000111000000"
  2794. "11101100001110000111010"
  2795. "11001011011101101010001"
  2796. "00000010100010001111101"
  2797. "01011101101100101000101"
  2798. "00000001011111010101000"
  2799. "00000000110010100000000"
  2800. "11111110101010101110101"
  2801. "00000010011100101110101"
  2802. "11111010010010101110101"
  2803. "00001010100100100000101"
  2804. "11101010110101001111101"
  2805. "11101010000101100000001"
  2806. "11101010111010101111111"
  2807. },
  2808. /* 74*/ { UNICODE_MODE, 32, 2, -1, -1, "바코드", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 32 Example 6 same",
  2809. "11111110111101101111111"
  2810. "10000000101111000000001"
  2811. "10111110000000101111101"
  2812. "10100000111000100000101"
  2813. "10101110110110001110101"
  2814. "10101110100111001110101"
  2815. "10101110111001101110101"
  2816. "00000000100100100000000"
  2817. "00010101000111010000000"
  2818. "00011100101000111001111"
  2819. "00101010111101000110111"
  2820. "01101010111110011001101"
  2821. "01010000101011001000111"
  2822. "00101100110010111001111"
  2823. "00000001010100010101000"
  2824. "00000000111001100000000"
  2825. "11111110100110101110101"
  2826. "00000010001101101110101"
  2827. "11111010001101101110101"
  2828. "00001010110001100000101"
  2829. "11101010111010001111101"
  2830. "11101010011010100000001"
  2831. "11101010111010101111111"
  2832. },
  2833. /* 75*/ { UNICODE_MODE, 33, 2, -1, 4 << 8, "条码", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 33 Example 1 same with explicit mask 11 (auto 10)",
  2834. "11111110111101101111111"
  2835. "10000000101111000000001"
  2836. "10111110000000101111101"
  2837. "10100000111001100000101"
  2838. "10101110111100001110101"
  2839. "10101110100111001110101"
  2840. "10101110111101101110101"
  2841. "00000000110101100000000"
  2842. "00010101000111010000000"
  2843. "00001111100000111001111"
  2844. "10001100010100111100110"
  2845. "10011000010001010001111"
  2846. "01000111011101111000111"
  2847. "00101101101101010011100"
  2848. "00000001010010010101000"
  2849. "00000000110001100000000"
  2850. "11111110100110101110101"
  2851. "00000010001101101110101"
  2852. "11111010001100101110101"
  2853. "00001010111000100000101"
  2854. "11101010110010001111101"
  2855. "11101010011010100000001"
  2856. "11101010111010101111111"
  2857. },
  2858. /* 76*/ { UNICODE_MODE, 33, 2, -1, -1, "バーコード", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 33 Example 2 same",
  2859. "11111110111101101111111"
  2860. "10000000101101000000001"
  2861. "10111110000000101111101"
  2862. "10100000111001100000101"
  2863. "10101110111110001110101"
  2864. "10101110100111001110101"
  2865. "10101110111001101110101"
  2866. "00000000100111100000000"
  2867. "00010101000111010000000"
  2868. "00010000101000111001111"
  2869. "10001110100101000000101"
  2870. "11110010101101101100010"
  2871. "01010001001000011110100"
  2872. "10111010101110110111100"
  2873. "00000001001110010101000"
  2874. "00000000110111100000000"
  2875. "11111110111010101110101"
  2876. "00000010000101101110101"
  2877. "11111010000001101110101"
  2878. "00001010100010100000101"
  2879. "11101010101000001111101"
  2880. "11101010010011100000001"
  2881. "11101010111010101111111"
  2882. },
  2883. /* 77*/ { UNICODE_MODE, 33, 2, -1, 2 << 8, "바코드", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 33 Example 3 same with explicit mask 01 (auto 11)",
  2884. "11111110011010101111111"
  2885. "10000000011101100000001"
  2886. "10111110001010001111101"
  2887. "10100000110100100000101"
  2888. "10101110001100001110101"
  2889. "10101110110101101110101"
  2890. "10101110001010001110101"
  2891. "00000000110101000000000"
  2892. "00010101001010100000000"
  2893. "01010011010101010100000"
  2894. "11110010100101001000000"
  2895. "10110000011001101011111"
  2896. "01010010011011010011111"
  2897. "00101000000101001000100"
  2898. "00000000101010010101000"
  2899. "00000000010101100000000"
  2900. "11111110001101001110101"
  2901. "00000010110101101110101"
  2902. "11111010001010001110101"
  2903. "00001010111011100000101"
  2904. "11101010001010001111101"
  2905. "11101010110101000000001"
  2906. "11101010101010001111111"
  2907. },
  2908. /* 78*/ { UNICODE_MODE, 34, 2, -1, 4 << 8, "条码", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 34 Example 1 same with explicit mask 11 (auto 10)",
  2909. "11111110111101101111111"
  2910. "10000000101111000000001"
  2911. "10111110000000101111101"
  2912. "10100000111010100000101"
  2913. "10101110111110001110101"
  2914. "10101110100111001110101"
  2915. "10101110111001101110101"
  2916. "00000000100111100000000"
  2917. "00010101000111010000000"
  2918. "00010010011000111000111"
  2919. "10010000001111000100011"
  2920. "00101100011001110101100"
  2921. "01100101010010111000111"
  2922. "00101011101100111101010"
  2923. "00000001001010010101000"
  2924. "00000000110001100000000"
  2925. "11111110101101101110101"
  2926. "00000010011101101110101"
  2927. "11111010011101101110101"
  2928. "00001010101000100000101"
  2929. "11101010111010001111101"
  2930. "11101010011010100000001"
  2931. "11101010111010101111111"
  2932. },
  2933. /* 79*/ { UNICODE_MODE, 34, 2, -1, 2 << 8, "バーコード", -1, 0, 25, 25, "AIM ITS/04-023:2022 ECI 34 Example 2 same with explicit mask 01 (auto 10)",
  2934. "1111111011101011001111111"
  2935. "1000000001010101000000001"
  2936. "1011111010001110001111101"
  2937. "1010000001100111000000101"
  2938. "1010111000110110101110101"
  2939. "1010111011000010001110101"
  2940. "1010111000000000101110101"
  2941. "0000000011010101100000000"
  2942. "0001011001100110011000000"
  2943. "0010011010000101010101010"
  2944. "0010010010101010101010110"
  2945. "0011001101010110010110111"
  2946. "0110000010110001001010101"
  2947. "0010000101010101010101111"
  2948. "1000101010101010101110000"
  2949. "0111010101100101100100110"
  2950. "0000001101111010001101000"
  2951. "0000000010100001100000000"
  2952. "1111111011101011001110101"
  2953. "0000001000000110101110101"
  2954. "1111101011101010001110101"
  2955. "0000101001010101000000101"
  2956. "1110101000101010101111101"
  2957. "1110101001110101000000001"
  2958. "1110101000101010101111111"
  2959. },
  2960. /* 80*/ { UNICODE_MODE, 34, 2, -1, 4 << 8, "바코드", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 34 Example 3 same with explicit mask 11 (auto 01)",
  2961. "11111110111101101111111"
  2962. "10000000101111000000001"
  2963. "10111110000010101111101"
  2964. "10100000101010100000101"
  2965. "10101110111111001110101"
  2966. "10101110101110001110101"
  2967. "10101110101001101110101"
  2968. "00000000100111100000000"
  2969. "00010101011011010000000"
  2970. "00010110011000111000111"
  2971. "10010011010011000010011"
  2972. "11000010101111101110110"
  2973. "11000101110101111000111"
  2974. "00011111101110010110011"
  2975. "00000001011101010101000"
  2976. "00000000111010100000000"
  2977. "11111110110011101110101"
  2978. "00000010000111101110101"
  2979. "11111010001100101110101"
  2980. "00001010111111100000101"
  2981. "11101010100010001111101"
  2982. "11101010011010100000001"
  2983. "11101010111010101111111"
  2984. },
  2985. /* 81*/ { UNICODE_MODE, 35, 2, -1, 2 << 8, "条码", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 35 Example 1 same with explicit mask 01 (auto 11)",
  2986. "11111110011010101111111"
  2987. "10000000011101100000001"
  2988. "10111110001010001111101"
  2989. "10100000110110100000101"
  2990. "10101110001110001110101"
  2991. "10101110110101101110101"
  2992. "10101110001110001110101"
  2993. "00000000100111000000000"
  2994. "00010101001010100000000"
  2995. "01000000101101010100010"
  2996. "10100000111110101010000"
  2997. "01110101101011000001100"
  2998. "01000111010101010100100"
  2999. "00111001010101010110000"
  3000. "00000000101101010101000"
  3001. "00000000001011100000000"
  3002. "11111110010001001110101"
  3003. "00000010100101101110101"
  3004. "11111010001010001110101"
  3005. "00001010110011100000101"
  3006. "11101010000010001111101"
  3007. "11101010110101000000001"
  3008. "11101010101010001111111"
  3009. },
  3010. /* 82*/ { UNICODE_MODE, 35, 2, -1, -1, "バーコード", -1, 0, 25, 25, "AIM ITS/04-023:2022 ECI 35 Example 2 same",
  3011. "1111111011101011001111111"
  3012. "1000000001110101000000001"
  3013. "1011111010100100001111101"
  3014. "1010000001000110000000101"
  3015. "1010111000110010101110101"
  3016. "1010111011010100001110101"
  3017. "1010111000011010101110101"
  3018. "0000000011010101100000000"
  3019. "0001011000101001011000000"
  3020. "1100100000000110001001011"
  3021. "0000011100101011001010101"
  3022. "0010100001010101010101000"
  3023. "0010001010101010101100001"
  3024. "0010010101101111000110001"
  3025. "0010010010110010101010111"
  3026. "0010010101010101010010101"
  3027. "0000001101001010001101000"
  3028. "0000000011010101100000000"
  3029. "1111111010101010001110101"
  3030. "0000001000101001101110101"
  3031. "1111101010100000001110101"
  3032. "0000101001010101000000101"
  3033. "1110101001100110101111101"
  3034. "1110101000101100000000001"
  3035. "1110101000001010101111111"
  3036. },
  3037. /* 83*/ { UNICODE_MODE, 35, 2, -1, 4 << 8, "바코드", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 35 Example 3 same with explicit mask 11 (auto 01)",
  3038. "11111110111101101111111"
  3039. "10000000101101000000001"
  3040. "10111110010000101111101"
  3041. "10100000111011100000101"
  3042. "10101110111110001110101"
  3043. "10101110100111001110101"
  3044. "10101110111001101110101"
  3045. "00000000100111100000000"
  3046. "00010101000111010000000"
  3047. "00010110011000111001101"
  3048. "11001101000100100111100"
  3049. "01110101101110001001100"
  3050. "01001101111100010001011"
  3051. "00111111010001000000011"
  3052. "00000001010010010101000"
  3053. "00000000110011100000000"
  3054. "11111110100111101110101"
  3055. "00000010011101101110101"
  3056. "11111010000000101110101"
  3057. "00001010111001100000101"
  3058. "11101010110101001111101"
  3059. "11101010011111100000001"
  3060. "11101010111010101111111"
  3061. },
  3062. /* 84*/ { UNICODE_MODE, 170, 2, -1, -1, "sn:7QPB4MN", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 170 Example 1 same",
  3063. "11111110111100101111111"
  3064. "10000000100111000000001"
  3065. "10111110000000101111101"
  3066. "10100000111000100000101"
  3067. "10101110101100001110101"
  3068. "10101110100111001110101"
  3069. "10101110111100101110101"
  3070. "00000000100101100000000"
  3071. "00010101000111010000000"
  3072. "00000001000000111000110"
  3073. "01101000001101101011010"
  3074. "10011010011110101000101"
  3075. "10011110000111011110101"
  3076. "11100101111011010011101"
  3077. "00000001011010010101000"
  3078. "00000000100100100000000"
  3079. "11111110100101101110101"
  3080. "00000010010100101110101"
  3081. "11111010000011101110101"
  3082. "00001010101010100000101"
  3083. "11101010111101001111101"
  3084. "11101010000110100000001"
  3085. "11101010111010101111111"
  3086. },
  3087. /* 85*/ { DATA_MODE, 899, 2, -1, -1, "\000\001\002\133\134\135\375\376\377", 9, 0, 23, 23, "AIM ITS/04-023:2022 ECI 899 Example 1 same",
  3088. "11111110011011101111111"
  3089. "10000000010110100000001"
  3090. "10111110010110001111101"
  3091. "10100000110110100000101"
  3092. "10101110011010001110101"
  3093. "10101110110101101110101"
  3094. "10101110001011001110101"
  3095. "00000000100110000000000"
  3096. "00010101001010100000000"
  3097. "01010101010101010101110"
  3098. "00100111001010101010010"
  3099. "11110101000100110000110"
  3100. "11100000101110011100001"
  3101. "11011110100100001000001"
  3102. "00000000110111010101000"
  3103. "00000000001011100000000"
  3104. "11111110010000001110101"
  3105. "00000010111011101110101"
  3106. "11111010010100001110101"
  3107. "00001010100100100000101"
  3108. "11101010000101001111101"
  3109. "11101010100010000000001"
  3110. "11101010101010001111111"
  3111. },
  3112. };
  3113. const int data_size = ARRAY_SIZE(data);
  3114. int i, length, ret;
  3115. struct zint_symbol *symbol = NULL;
  3116. char escaped[8192];
  3117. char cmp_buf[32768];
  3118. char cmp_msg[1024];
  3119. int do_zxingcpp = (debug & ZINT_DEBUG_TEST_ZXINGCPP) && testUtilHaveZXingCPPDecoder(); /* Only do ZXing-C++ test if asked, too slow otherwise */
  3120. testStartSymbol("test_encode", &symbol);
  3121. for (i = 0; i < data_size; i++) {
  3122. if (testContinue(p_ctx, i)) continue;
  3123. symbol = ZBarcode_Create();
  3124. assert_nonnull(symbol, "Symbol not created\n");
  3125. length = testUtilSetSymbol(symbol, BARCODE_HANXIN, data[i].input_mode, data[i].eci,
  3126. data[i].option_1, data[i].option_2, data[i].option_3, -1 /*output_options*/,
  3127. data[i].data, data[i].length, debug);
  3128. ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
  3129. assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
  3130. if (p_ctx->generate) {
  3131. printf(" /*%3d*/ { %s, %d, %d, %d, %s, \"%s\", %d, %s, %d, %d, \"%s\",\n",
  3132. i, testUtilInputModeName(data[i].input_mode), data[i].eci,
  3133. data[i].option_1, data[i].option_2, testUtilOption3Name(BARCODE_HANXIN, data[i].option_3),
  3134. testUtilEscape(data[i].data, length, escaped, sizeof(escaped)), data[i].length,
  3135. testUtilErrorName(data[i].ret), symbol->rows, symbol->width, data[i].comment);
  3136. testUtilModulesPrint(symbol, " ", "\n");
  3137. printf(" },\n");
  3138. } else {
  3139. if (ret < ZINT_ERROR) {
  3140. int width, row;
  3141. assert_equal(symbol->rows, data[i].expected_rows, "i:%d symbol->rows %d != %d (%s)\n", i, symbol->rows, data[i].expected_rows, data[i].data);
  3142. assert_equal(symbol->width, data[i].expected_width, "i:%d symbol->width %d != %d (%s)\n", i, symbol->width, data[i].expected_width, data[i].data);
  3143. ret = testUtilModulesCmp(symbol, data[i].expected, &width, &row);
  3144. assert_zero(ret, "i:%d testUtilModulesCmp ret %d != 0 width %d row %d (%s)\n", i, ret, width, row, data[i].data);
  3145. if (do_zxingcpp && testUtilCanZXingCPP(i, symbol, data[i].data, length, debug)) {
  3146. int cmp_len, ret_len;
  3147. char modules_dump[49152];
  3148. assert_notequal(testUtilModulesDump(symbol, modules_dump, sizeof(modules_dump)), -1, "i:%d testUtilModulesDump == -1\n", i);
  3149. ret = testUtilZXingCPP(i, symbol, data[i].data, length, modules_dump, cmp_buf, sizeof(cmp_buf), &cmp_len);
  3150. assert_zero(ret, "i:%d %s testUtilZXingCPP ret %d != 0\n", i, testUtilBarcodeName(symbol->symbology), ret);
  3151. ret = testUtilZXingCPPCmp(symbol, cmp_msg, cmp_buf, cmp_len, data[i].data, length, NULL /*primary*/, escaped, &ret_len);
  3152. assert_zero(ret, "i:%d %s testUtilZXingCPPCmp %d != 0 %s\n actual: %.*s\nexpected: %.*s\n",
  3153. i, testUtilBarcodeName(symbol->symbology), ret, cmp_msg, cmp_len, cmp_buf, ret_len, escaped);
  3154. }
  3155. }
  3156. }
  3157. ZBarcode_Delete(symbol);
  3158. }
  3159. testFinish();
  3160. }
  3161. static void test_encode_segs(const testCtx *const p_ctx) {
  3162. int debug = p_ctx->debug;
  3163. struct item {
  3164. int input_mode;
  3165. int option_1;
  3166. int option_2;
  3167. int option_3;
  3168. struct zint_seg segs[3];
  3169. int ret;
  3170. int expected_rows;
  3171. int expected_width;
  3172. char *comment;
  3173. char *expected;
  3174. };
  3175. static const struct item data[] = {
  3176. /* 0*/ { UNICODE_MODE, -1, -1, -1, { { TU("¶"), -1, 0 }, { TU("Ж"), -1, 7 }, { TU(""), 0, 0 } }, 0, 23, 23, "Standard example",
  3177. "11111110101100101111111"
  3178. "10000000010110000000001"
  3179. "10111110110000001111101"
  3180. "10100000110101000000101"
  3181. "10101110001010101110101"
  3182. "10101110111110101110101"
  3183. "10101110001100001110101"
  3184. "00000000101110100000000"
  3185. "00010101111111001000000"
  3186. "11111101010110101111001"
  3187. "00111010100000101010110"
  3188. "10000101011001001100101"
  3189. "11001000111111101010100"
  3190. "00010100101000101011001"
  3191. "00000010011010110101000"
  3192. "00000000101011100000000"
  3193. "11111110000000001110101"
  3194. "00000010110111101110101"
  3195. "11111010110101001110101"
  3196. "00001010001000100000101"
  3197. "11101010000110101111101"
  3198. "11101010010110000000001"
  3199. "11101010101010101111111"
  3200. },
  3201. /* 1*/ { UNICODE_MODE, -1, -1, -1, { { TU("¶"), -1, 0 }, { TU("Ж"), -1, 0 }, { TU(""), 0, 0 } }, ZINT_WARN_USES_ECI, 23, 23, "Standard example auto-ECI",
  3202. "11111110101100101111111"
  3203. "10000000010110000000001"
  3204. "10111110110000001111101"
  3205. "10100000110101000000101"
  3206. "10101110001010101110101"
  3207. "10101110111110101110101"
  3208. "10101110001100001110101"
  3209. "00000000101110100000000"
  3210. "00010101111111001000000"
  3211. "11111101010110101111001"
  3212. "00111010100000101010110"
  3213. "10000101011001001100101"
  3214. "11001000111111101010100"
  3215. "00010100101000101011001"
  3216. "00000010011010110101000"
  3217. "00000000101011100000000"
  3218. "11111110000000001110101"
  3219. "00000010110111101110101"
  3220. "11111010110101001110101"
  3221. "00001010001000100000101"
  3222. "11101010000110101111101"
  3223. "11101010010110000000001"
  3224. "11101010101010101111111"
  3225. },
  3226. /* 2*/ { UNICODE_MODE, -1, -1, -1, { { TU("Ж"), -1, 7 }, { TU("¶"), -1, 0 }, { TU(""), 0, 0 } }, 0, 23, 23, "Standard example inverted",
  3227. "11111110111010001111111"
  3228. "10000000110110000000001"
  3229. "10111110111000101111101"
  3230. "10100000100010000000101"
  3231. "10101110001100001110101"
  3232. "10101110111010001110101"
  3233. "10101110010010001110101"
  3234. "00000000010101000000000"
  3235. "00010101101011110000000"
  3236. "00010100111110000010001"
  3237. "11100000000010101011000"
  3238. "10001001100101010100110"
  3239. "10101001111000110001111"
  3240. "00110100010101001111000"
  3241. "00000001101010110101000"
  3242. "00000000010110000000000"
  3243. "11111110001101001110101"
  3244. "00000010010101101110101"
  3245. "11111010001011001110101"
  3246. "00001010010110100000101"
  3247. "11101010101010101111101"
  3248. "11101010010101100000001"
  3249. "11101010001010101111111"
  3250. },
  3251. /* 3*/ { UNICODE_MODE, -1, -1, -1, { { TU("Ж"), -1, 0 }, { TU("¶"), -1, 0 }, { TU(""), 0, 0 } }, ZINT_WARN_USES_ECI, 23, 23, "Standard example inverted auto-ECI",
  3252. "11111110111010001111111"
  3253. "10000000110110000000001"
  3254. "10111110111000101111101"
  3255. "10100000100010000000101"
  3256. "10101110001100001110101"
  3257. "10101110111010001110101"
  3258. "10101110010010001110101"
  3259. "00000000010101000000000"
  3260. "00010101101011110000000"
  3261. "00010100111110000010001"
  3262. "11100000000010101011000"
  3263. "10001001100101010100110"
  3264. "10101001111000110001111"
  3265. "00110100010101001111000"
  3266. "00000001101010110101000"
  3267. "00000000010110000000000"
  3268. "11111110001101001110101"
  3269. "00000010010101101110101"
  3270. "11111010001011001110101"
  3271. "00001010010110100000101"
  3272. "11101010101010101111101"
  3273. "11101010010101100000001"
  3274. "11101010001010101111111"
  3275. },
  3276. /* 4*/ { UNICODE_MODE, -1, -1, 4 << 8, { { 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, 51, 51, "AIM ITS/04-023:2022 Annex A example **NOT SAME ** example corrupt???",
  3277. "111111100111111110011011000110010101001011101111111"
  3278. "100000000000000011100101000111110000010100100000001"
  3279. "101111101110011011101101000011010010010001001111101"
  3280. "101000001001111010100101100101010111101100100000101"
  3281. "101011100001110010100101010100111100010110001110101"
  3282. "101011101000000011001001010001100001000011001110101"
  3283. "101011101001101011110101011110100011100100001110101"
  3284. "000000000000000011011110101000100111010001100000000"
  3285. "001000110010011010000001111010101101101100001000000"
  3286. "001010111000010011111011010010001101111101001001011"
  3287. "110010110000111010001010001111000001000110001001010"
  3288. "111100100000011010101001100000101101010001011010101"
  3289. "100010001001110010101001010001100011110011101001011"
  3290. "111001111101010011011111111101000010110100000011101"
  3291. "000100000100010010110111110000110100111011010011000"
  3292. "011001011101001011100101110010101010011101110011011"
  3293. "001100010000001011110101011000000010001111101010100"
  3294. "101011100100010011111111111111111101011000010100101"
  3295. "000111010000010000000000000000000110001101111011100"
  3296. "100001011001110000011011010111000101001111101101010"
  3297. "101000111100100101110100001001010111010000010010000"
  3298. "110101000011101100100010001100110110011100110010000"
  3299. "111101100011001000011101101110010101001010101010110"
  3300. "110100100010010011011011111011000100011100000101010"
  3301. "100011011101110000011101101001000100010010001110110"
  3302. "111110010100001001110110000001000101011111011001011"
  3303. "111101100101111110010000101001110111010011001110011"
  3304. "111000001110111101100100010100100111100101101100110"
  3305. "110000110011101100001111001100110101000010000110001"
  3306. "101110001001011110101001110101100101110001001100001"
  3307. "111101000101011001011111001101000111111010010001000"
  3308. "110010011000111100011011001100010111101011110101001"
  3309. "111100111101111111011101111110000111101100010100010"
  3310. "110001011010011101111100110100100111001110011100001"
  3311. "111111111111111110011011000100000111111111111111111"
  3312. "000000000000000011001010100111010000000000000000001"
  3313. "111010001110010010110011000010100110010010010111101"
  3314. "001100111011101011011100110010100101011101010101101"
  3315. "100010010001101010100111110101111101001001011101101"
  3316. "001100001000111010111110011000000000000010000011001"
  3317. "110101100010111010100010101001111010110011110100001"
  3318. "111011101001011010111111101101011101000001010101101"
  3319. "000000100011001011110010011110010010110000011000100"
  3320. "000000001001101010101111000010000011000100000000000"
  3321. "111111100101101011101001011000111110100111101110101"
  3322. "000000100101100011010011110011000101101100101110101"
  3323. "111110100110010010000111010110111001001101001110101"
  3324. "000010101010110010011001111100010010001010100000101"
  3325. "111010100110011010000010110001111100010001101111101"
  3326. "111010101000000011001110011001100001110110000000001"
  3327. "111010101011000011111111111111110101110100001111111"
  3328. },
  3329. /* 5*/ { DATA_MODE, -1, -1, -1, { { TU("\266"), 1, 0 }, { TU("\266"), 1, 7 }, { TU("\266"), 1, 0 } }, 0, 23, 23, "Standard example + extra seg, data mode",
  3330. "11111110101100001111111"
  3331. "10000000110110000000001"
  3332. "10111110110101101111101"
  3333. "10100000100101000000101"
  3334. "10101110001010001110101"
  3335. "10101110110001001110101"
  3336. "10101110010100001110101"
  3337. "00000000001110000000000"
  3338. "00010101101001110000000"
  3339. "10011101010001000011001"
  3340. "00111100100000101010010"
  3341. "11110101011000100100101"
  3342. "11000000001101101010100"
  3343. "00100110110011010010110"
  3344. "00000001101010110101000"
  3345. "00000000010111000000000"
  3346. "11111110011110001110101"
  3347. "00000010000110101110101"
  3348. "11111010000110001110101"
  3349. "00001010000100100000101"
  3350. "11101010101100101111101"
  3351. "11101010010101100000001"
  3352. "11101010001010101111111"
  3353. },
  3354. /* 6*/ { UNICODE_MODE, -1, -1, -1, { { TU("éÿ"), -1, 0 }, { TU("กขฯ"), -1, 13 }, { TU("αβγώ"), -1, 0 } }, ZINT_WARN_USES_ECI, 23, 23, "Auto-ECI",
  3355. "11111110001100001111111"
  3356. "10000000110101100000001"
  3357. "10111110001010101111101"
  3358. "10100000110101100000101"
  3359. "10101110001001101110101"
  3360. "10101110110010001110101"
  3361. "10101110001001001110101"
  3362. "00000000000001100000000"
  3363. "00010101001101011000000"
  3364. "11001010101111101100110"
  3365. "10101101010111000011011"
  3366. "01010001010101010101010"
  3367. "10010010101010001011000"
  3368. "00011110010000110000101"
  3369. "00000011001101010101000"
  3370. "00000000101111000000000"
  3371. "11111110001010001110101"
  3372. "00000010010101101110101"
  3373. "11111010101110001110101"
  3374. "00001010111010100000101"
  3375. "11101010111000001111101"
  3376. "11101010111001100000001"
  3377. "11101010001010001111111"
  3378. },
  3379. };
  3380. const int data_size = ARRAY_SIZE(data);
  3381. int i, j, seg_count, ret;
  3382. struct zint_symbol *symbol = NULL;
  3383. char escaped[8192];
  3384. char cmp_buf[32768];
  3385. char cmp_msg[1024];
  3386. int do_zxingcpp = (debug & ZINT_DEBUG_TEST_ZXINGCPP) && testUtilHaveZXingCPPDecoder(); /* Only do ZXing-C++ test if asked, too slow otherwise */
  3387. testStartSymbol("test_encode_segs", &symbol);
  3388. for (i = 0; i < data_size; i++) {
  3389. if (testContinue(p_ctx, i)) continue;
  3390. symbol = ZBarcode_Create();
  3391. assert_nonnull(symbol, "Symbol not created\n");
  3392. testUtilSetSymbol(symbol, BARCODE_HANXIN, data[i].input_mode, -1 /*eci*/,
  3393. data[i].option_1, data[i].option_2, data[i].option_3, -1 /*output_options*/,
  3394. NULL, 0, debug);
  3395. for (j = 0, seg_count = 0; j < 3 && data[i].segs[j].length; j++, seg_count++);
  3396. ret = ZBarcode_Encode_Segs(symbol, data[i].segs, seg_count);
  3397. assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode_Segs ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
  3398. if (p_ctx->generate) {
  3399. char escaped1[8192];
  3400. char escaped2[8192];
  3401. int length = data[i].segs[0].length == -1 ? (int) ustrlen(data[i].segs[0].source) : data[i].segs[0].length;
  3402. int length1 = data[i].segs[1].length == -1 ? (int) ustrlen(data[i].segs[1].source) : data[i].segs[1].length;
  3403. int length2 = data[i].segs[2].length == -1 ? (int) ustrlen(data[i].segs[2].source) : data[i].segs[2].length;
  3404. printf(" /*%3d*/ { %s, %d, %d, %s, { { TU(\"%s\"), %d, %d }, { TU(\"%s\"), %d, %d }, { TU(\"%s\"), %d, %d } }, %s, %d, %d, \"%s\",\n",
  3405. i, testUtilInputModeName(data[i].input_mode),
  3406. data[i].option_1, data[i].option_2, testUtilOption3Name(BARCODE_HANXIN, data[i].option_3),
  3407. testUtilEscape((const char *) data[i].segs[0].source, length, escaped, sizeof(escaped)), data[i].segs[0].length, data[i].segs[0].eci,
  3408. testUtilEscape((const char *) data[i].segs[1].source, length1, escaped1, sizeof(escaped1)), data[i].segs[1].length, data[i].segs[1].eci,
  3409. testUtilEscape((const char *) data[i].segs[2].source, length2, escaped2, sizeof(escaped2)), data[i].segs[2].length, data[i].segs[2].eci,
  3410. testUtilErrorName(data[i].ret), symbol->rows, symbol->width, data[i].comment);
  3411. testUtilModulesPrint(symbol, " ", "\n");
  3412. printf(" },\n");
  3413. } else {
  3414. if (ret < ZINT_ERROR) {
  3415. int width, row;
  3416. assert_equal(symbol->rows, data[i].expected_rows, "i:%d symbol->rows %d != %d\n", i, symbol->rows, data[i].expected_rows);
  3417. assert_equal(symbol->width, data[i].expected_width, "i:%d symbol->width %d != %d\n", i, symbol->width, data[i].expected_width);
  3418. ret = testUtilModulesCmp(symbol, data[i].expected, &width, &row);
  3419. assert_zero(ret, "i:%d testUtilModulesCmp ret %d != 0 width %d row %d\n", i, ret, width, row);
  3420. if (do_zxingcpp) {
  3421. if ((symbol->input_mode & 0x07) == DATA_MODE) {
  3422. if (debug & ZINT_DEBUG_TEST_PRINT) {
  3423. printf("i:%d multiple segments in DATA_MODE not currently supported for ZXing-C++ testing (%s)\n",
  3424. i, testUtilBarcodeName(symbol->symbology));
  3425. }
  3426. } else {
  3427. int length = data[i].segs[0].length == -1 ? (int) ustrlen(data[i].segs[0].source) : data[i].segs[0].length;
  3428. if (testUtilCanZXingCPP(i, symbol, (const char *) data[i].segs[0].source, length, debug)) {
  3429. int cmp_len, ret_len;
  3430. char modules_dump[49152];
  3431. assert_notequal(testUtilModulesDump(symbol, modules_dump, sizeof(modules_dump)), -1, "i:%d testUtilModulesDump == -1\n", i);
  3432. ret = testUtilZXingCPP(i, symbol, (const char *) data[i].segs[0].source, length,
  3433. modules_dump, cmp_buf, sizeof(cmp_buf), &cmp_len);
  3434. assert_zero(ret, "i:%d %s testUtilZXingCPP ret %d != 0\n", i, testUtilBarcodeName(symbol->symbology), ret);
  3435. ret = testUtilZXingCPPCmpSegs(symbol, cmp_msg, cmp_buf, cmp_len, data[i].segs, seg_count,
  3436. NULL /*primary*/, escaped, &ret_len);
  3437. assert_zero(ret, "i:%d %s testUtilZXingCPPCmpSegs %d != 0 %s\n actual: %.*s\nexpected: %.*s\n",
  3438. i, testUtilBarcodeName(symbol->symbology), ret, cmp_msg, cmp_len, cmp_buf, ret_len, escaped);
  3439. }
  3440. }
  3441. }
  3442. }
  3443. }
  3444. ZBarcode_Delete(symbol);
  3445. }
  3446. testFinish();
  3447. }
  3448. /* #300 Andre Maute */
  3449. static void test_fuzz(const testCtx *const p_ctx) {
  3450. int debug = p_ctx->debug;
  3451. struct item {
  3452. int symbology;
  3453. int input_mode;
  3454. int eci;
  3455. int option_1;
  3456. int option_2;
  3457. int option_3;
  3458. char *data;
  3459. int length;
  3460. int ret;
  3461. int bwipp_cmp;
  3462. char *comment;
  3463. };
  3464. /* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
  3465. static const struct item data[] = {
  3466. /* 0*/ { BARCODE_HANXIN, DATA_MODE, 35, -1, -1, ZINT_FULL_MULTIBYTE, "\215\215\215\215\215\350\215\215999\215\21500000\215\215\215\215\215\215\377O\000\000\036\000\000\000\000\357\376\026\377\377\377\377\241\241\232\232\232\232\232\232\235\032@\374:JGB \000\000@d\000\000\000\241\241\000\000\027\002\241\241\000\000\014\000\000\000\000\357\327\004\000\000\000\000\000\000\000\375\000\000\000\000\000\000\000\000\000\000\000\000\0000253]9R4R44,44,4404[255\350999\215\21599999\215\215\215\2150000\215\215\215\215\215\215\215\215\215]9444442<4444,4044%44vA\000\000\002\000'\000\000\215\377@\215\215\350\215\215\215\215\215\215\215\307\306\306n\215\215\000\000\001\000\000\203\000\000\000\000\000\000@\215\215\215[\2154315@]R0", 229, 0, 1, "" }, /* #300 (#16, adapted to HANXIN), Andre Maute */
  3467. };
  3468. const int data_size = ARRAY_SIZE(data);
  3469. int i, length, ret;
  3470. struct zint_symbol *symbol = NULL;
  3471. testStartSymbol("test_fuzz", &symbol);
  3472. for (i = 0; i < data_size; i++) {
  3473. if (testContinue(p_ctx, i)) continue;
  3474. symbol = ZBarcode_Create();
  3475. assert_nonnull(symbol, "Symbol not created\n");
  3476. length = testUtilSetSymbol(symbol, data[i].symbology, data[i].input_mode, data[i].eci, data[i].option_1, data[i].option_2, data[i].option_3, -1 /*output_options*/, data[i].data, data[i].length, debug);
  3477. ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
  3478. assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
  3479. ZBarcode_Delete(symbol);
  3480. }
  3481. testFinish();
  3482. }
  3483. #include <time.h>
  3484. #define TEST_PERF_ITERATIONS 1000
  3485. /* Not a real test, just performance indicator */
  3486. static void test_perf(const testCtx *const p_ctx) {
  3487. int debug = p_ctx->debug;
  3488. struct item {
  3489. int symbology;
  3490. int input_mode;
  3491. int option_1;
  3492. int option_2;
  3493. char *data;
  3494. int ret;
  3495. int expected_rows;
  3496. int expected_width;
  3497. char *comment;
  3498. };
  3499. static const struct item data[] = {
  3500. /* 0*/ { BARCODE_HANXIN, UNICODE_MODE, -1, -1,
  3501. "汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。",
  3502. ZINT_WARN_NONCOMPLIANT, 43, 43, "98 chars, Region One and Text" },
  3503. /* 1*/ { BARCODE_HANXIN, UNICODE_MODE, -1, -1,
  3504. "汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。"
  3505. "汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。"
  3506. "汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。"
  3507. "汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。"
  3508. "汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。"
  3509. "汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。"
  3510. "汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。"
  3511. "汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。"
  3512. "汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。"
  3513. "汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。",
  3514. ZINT_WARN_NONCOMPLIANT, 121, 121, "980 chars, Region One and Text" },
  3515. /* 2*/ { BARCODE_HANXIN, UNICODE_MODE, -1, -1,
  3516. "汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。"
  3517. "汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。"
  3518. "汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。"
  3519. "汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。"
  3520. "汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。"
  3521. "汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。"
  3522. "汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。"
  3523. "汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。"
  3524. "汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。"
  3525. "汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。"
  3526. "汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。"
  3527. "汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。"
  3528. "汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。"
  3529. "汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。"
  3530. "汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。汉信码(Chinese-Sensible Code)是一种能够有效表示汉字、图像等信息的二维条码。",
  3531. ZINT_WARN_NONCOMPLIANT, 147, 147, "1470 chars, Region One and Text" },
  3532. };
  3533. const int data_size = ARRAY_SIZE(data);
  3534. int i, length, ret;
  3535. clock_t start, total_encode = 0, total_buffer = 0, diff_encode, diff_buffer;
  3536. if (!(debug & ZINT_DEBUG_TEST_PERFORMANCE)) { /* -d 256 */
  3537. return;
  3538. }
  3539. for (i = 0; i < data_size; i++) {
  3540. int j;
  3541. if (testContinue(p_ctx, i)) continue;
  3542. diff_encode = diff_buffer = 0;
  3543. for (j = 0; j < TEST_PERF_ITERATIONS; j++) {
  3544. struct zint_symbol *symbol = ZBarcode_Create();
  3545. assert_nonnull(symbol, "Symbol not created\n");
  3546. length = testUtilSetSymbol(symbol, data[i].symbology, data[i].input_mode, -1 /*eci*/, data[i].option_1, data[i].option_2, -1, -1 /*output_options*/, data[i].data, -1, debug);
  3547. start = clock();
  3548. ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
  3549. diff_encode += clock() - start;
  3550. assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
  3551. assert_equal(symbol->rows, data[i].expected_rows, "i:%d symbol->rows %d != %d (%s)\n", i, symbol->rows, data[i].expected_rows, data[i].data);
  3552. assert_equal(symbol->width, data[i].expected_width, "i:%d symbol->width %d != %d (%s)\n", i, symbol->width, data[i].expected_width, data[i].data);
  3553. start = clock();
  3554. ret = ZBarcode_Buffer(symbol, 0 /*rotate_angle*/);
  3555. diff_buffer += clock() - start;
  3556. assert_zero(ret, "i:%d ZBarcode_Buffer ret %d != 0 (%s)\n", i, ret, symbol->errtxt);
  3557. ZBarcode_Delete(symbol);
  3558. }
  3559. printf("%s: diff_encode %gms, diff_buffer %gms\n", data[i].comment, diff_encode * 1000.0 / CLOCKS_PER_SEC, diff_buffer * 1000.0 / CLOCKS_PER_SEC);
  3560. total_encode += diff_encode;
  3561. total_buffer += diff_buffer;
  3562. }
  3563. if (p_ctx->index != -1) {
  3564. printf("totals: encode %gms, buffer %gms\n", total_encode * 1000.0 / CLOCKS_PER_SEC, total_buffer * 1000.0 / CLOCKS_PER_SEC);
  3565. }
  3566. }
  3567. int main(int argc, char *argv[]) {
  3568. testFunction funcs[] = { /* name, func */
  3569. { "test_large", test_large },
  3570. { "test_options", test_options },
  3571. { "test_input", test_input },
  3572. { "test_encode", test_encode },
  3573. { "test_encode_segs", test_encode_segs },
  3574. { "test_fuzz", test_fuzz },
  3575. { "test_perf", test_perf },
  3576. };
  3577. testRun(argc, argv, funcs, ARRAY_SIZE(funcs));
  3578. testReport();
  3579. return 0;
  3580. }
  3581. /* vim: set ts=4 sw=4 et norl : */