mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-12 22:25:59 -04:00
- API/CLI/Tcl/GUI: new output option BARCODE_BIND_TOP/--bindtop
/
`-bindtop`/"Bind Top" - DPD: add top boundary (width 3X) by default, using new BARCODE_BIND_TOP; "relabel" option; some compliance checks - GUI: only skip encoded/errored signal processing if active modal ExportDialog (wasn't clearing/setting error text bar correctly for DataDialog) - CODE128: debug print checksum - CODE49/DATAMATRIX/QR/ULTRA: fix uniqueness of errtxt nos - manual: fuller DPD doc; some spelling typos, formatting
This commit is contained in:
parent
e515f63fab
commit
2f8681b21a
44 changed files with 3643 additions and 2465 deletions
|
@ -185,6 +185,7 @@ static void test_hrt(const testCtx *const p_ctx) {
|
|||
struct item {
|
||||
int symbology;
|
||||
int input_mode;
|
||||
int option_2;
|
||||
char *data;
|
||||
int length;
|
||||
|
||||
|
@ -195,17 +196,46 @@ static void test_hrt(const testCtx *const p_ctx) {
|
|||
*/
|
||||
/* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
|
||||
struct item data[] = {
|
||||
/* 0*/ { BARCODE_CODE128, UNICODE_MODE, "1234567890", -1, "1234567890" },
|
||||
/* 1*/ { BARCODE_CODE128, UNICODE_MODE, "\000ABC\000DEF\000", 9, " ABC DEF " },
|
||||
/* 2*/ { BARCODE_CODE128B, UNICODE_MODE, "12345\00067890", 11, "12345 67890" },
|
||||
/* 3*/ { BARCODE_CODE128, UNICODE_MODE, "12345\01167890\037\177", -1, "12345 67890 " },
|
||||
/* 4*/ { BARCODE_CODE128, UNICODE_MODE, "abcdé", -1, "abcdé" },
|
||||
/* 5*/ { BARCODE_CODE128, DATA_MODE, "abcd\351", -1, "abcdé" },
|
||||
/* 6*/ { BARCODE_CODE128, DATA_MODE, "ab\240cd\351", -1, "ab\302\240cdé" }, /* NBSP */
|
||||
/* 7*/ { BARCODE_CODE128B, UNICODE_MODE, "abcdé", -1, "abcdé" },
|
||||
/* 8*/ { BARCODE_CODE128B, DATA_MODE, "abcd\351", -1, "abcdé" },
|
||||
/* 9*/ { BARCODE_HIBC_128, UNICODE_MODE, "1234567890", -1, "*+12345678900*" },
|
||||
/* 10*/ { BARCODE_HIBC_128, UNICODE_MODE, "a99912345", -1, "*+A999123457*" }, /* Converts to upper */
|
||||
/* 0*/ { BARCODE_CODE128, UNICODE_MODE, -1, "1234567890", -1, "1234567890" },
|
||||
/* 1*/ { BARCODE_CODE128, UNICODE_MODE, -1, "\000ABC\000DEF\000", 9, " ABC DEF " },
|
||||
/* 2*/ { BARCODE_CODE128B, UNICODE_MODE, -1, "12345\00067890", 11, "12345 67890" },
|
||||
/* 3*/ { BARCODE_CODE128, UNICODE_MODE, -1, "12345\01167890\037\177", -1, "12345 67890 " },
|
||||
/* 4*/ { BARCODE_CODE128, UNICODE_MODE, -1, "abcdé", -1, "abcdé" },
|
||||
/* 5*/ { BARCODE_CODE128, DATA_MODE, -1, "abcd\351", -1, "abcdé" },
|
||||
/* 6*/ { BARCODE_CODE128, DATA_MODE, -1, "ab\240cd\351", -1, "ab\302\240cdé" }, /* NBSP */
|
||||
/* 7*/ { BARCODE_CODE128B, UNICODE_MODE, -1, "abcdé", -1, "abcdé" },
|
||||
/* 8*/ { BARCODE_CODE128B, DATA_MODE, -1, "abcd\351", -1, "abcdé" },
|
||||
/* 9*/ { BARCODE_HIBC_128, UNICODE_MODE, -1, "1234567890", -1, "*+12345678900*" },
|
||||
/* 10*/ { BARCODE_HIBC_128, UNICODE_MODE, -1, "a99912345", -1, "*+A999123457*" }, /* Converts to upper */
|
||||
/* 11*/ { BARCODE_DPD, UNICODE_MODE, -1, "000393206219912345678101040", -1, "0003 932 0621 9912 3456 78 101 040 9" }, /* DPDAPPD 4.0.2 - Illustration 7 */
|
||||
/* 12*/ { BARCODE_DPD, UNICODE_MODE, -1, "007110601782532948375101276", -1, "0071 106 0178 2532 9483 75 101 276 X" }, /* DPDAPPD 4.0.2 - Illustration 6, figure's HRT seems incorrect */
|
||||
/* 13*/ { BARCODE_DPD, UNICODE_MODE, -1, "008182709980000020028101276", -1, "0081 827 0998 0000 0200 28 101 276 B" }, /* DPDPLS Section 4 */
|
||||
/* 14*/ { BARCODE_DPD, UNICODE_MODE, -1, "007110601632532948375179276", -1, "0071 106 0163 2532 9483 75 179 276 A" }, /* DPDPLS Section 4.6 */
|
||||
/* 15*/ { BARCODE_DPD, UNICODE_MODE, -1, "001990009980000020084109203", -1, "0019 900 0998 0000 0200 84 109 203 1" }, /* DPDPLS Section 5.1 */
|
||||
/* 16*/ { BARCODE_DPD, UNICODE_MODE, 1, "007110601632532948375101276", -1, "0071 106 0163 2532 9483 75 101 276 O" }, /* DPDPLS Section 6.1.2 relabel, figure is actually 8.7.2 with mislabelled HRT */
|
||||
/* 17*/ { BARCODE_DPD, UNICODE_MODE, -1, "008182709980000020029136276", -1, "0081 827 0998 0000 0200 29 136 276 3" }, /* DPDPLS Section 8.1 */
|
||||
/* 18*/ { BARCODE_DPD, UNICODE_MODE, -1, "001234509980000020031105276", -1, "0012 345 0998 0000 0200 31 105 276 L" }, /* DPDPLS Section 8.2 */
|
||||
/* 19*/ { BARCODE_DPD, UNICODE_MODE, -1, "008182709980000020032154276", -1, "0081 827 0998 0000 0200 32 154 276 J" }, /* DPDPLS Section 8.3 */
|
||||
/* 20*/ { BARCODE_DPD, UNICODE_MODE, -1, "008182709980000020030109276", -1, "0081 827 0998 0000 0200 30 109 276 W" }, /* DPDPLS Section 8.4 */
|
||||
/* 21*/ { BARCODE_DPD, UNICODE_MODE, -1, "008182709980000020033350276", -1, "0081 827 0998 0000 0200 33 350 276 C" }, /* DPDPLS Section 8.5.1 */
|
||||
/* 22*/ { BARCODE_DPD, UNICODE_MODE, -1, "008182709980000020034179276", -1, "0081 827 0998 0000 0200 34 179 276 I" }, /* DPDPLS Section 8.5.2 */
|
||||
/* 23*/ { BARCODE_DPD, UNICODE_MODE, -1, "008182709980000020035225276", -1, "0081 827 0998 0000 0200 35 225 276 H" }, /* DPDPLS Section 8.5.3 */
|
||||
/* 24*/ { BARCODE_DPD, UNICODE_MODE, -1, "008182709980000020036155276", -1, "0081 827 0998 0000 0200 36 155 276 5" }, /* DPDPLS Section 8.5.4 */
|
||||
/* 25*/ { BARCODE_DPD, UNICODE_MODE, -1, "000280009980000020037155056", -1, "0002 800 0998 0000 0200 37 155 056 6" }, /* DPDPLS Section 8.5.5 */
|
||||
/* 26*/ { BARCODE_DPD, UNICODE_MODE, -1, "007855009980000020041302840", -1, "0078 550 0998 0000 0200 41 302 840 U" }, /* DPDPLS Section 8.5.6 */
|
||||
/* 27*/ { BARCODE_DPD, UNICODE_MODE, -1, "008182709980000020042102276", -1, "0081 827 0998 0000 0200 42 102 276 R" }, /* DPDPLS Section 8.6.1 */
|
||||
/* 28*/ { BARCODE_DPD, UNICODE_MODE, -1, "008182709980000020043113276", -1, "0081 827 0998 0000 0200 43 113 276 Y" }, /* DPDPLS Section 8.7.1 */
|
||||
/* 29*/ { BARCODE_DPD, UNICODE_MODE, 1, "006376209980000020044118276", -1, "0063 762 0998 0000 0200 44 118 276 I" }, /* DPDPLS Section 8.7.2 relabel */
|
||||
/* 30*/ { BARCODE_DPD, UNICODE_MODE, -1, "007160009980000020050294276", -1, "0071 600 0998 0000 0200 50 294 276 C" }, /* DPDPLS Section 8.8 */
|
||||
/* 31*/ { BARCODE_DPD, UNICODE_MODE, -1, "008182709980000020045327276", -1, "0081 827 0998 0000 0200 45 327 276 N" }, /* DPDPLS Section 8.9.1 */
|
||||
/* 32*/ { BARCODE_DPD, UNICODE_MODE, -1, "006374309980000020047337276", -1, "0063 743 0998 0000 0200 47 337 276 O" }, /* DPDPLS Section 8.9.2 */
|
||||
/* 33*/ { BARCODE_DPD, UNICODE_MODE, 1, "006374109980978004757332276", -1, "0063 741 0998 0978 0047 57 332 276 M" }, /* DPDPLS Section 8.9.3 relabel, figure's HRT seems incorrect */
|
||||
/* 34*/ { BARCODE_DPD, UNICODE_MODE, -1, "008182709980000020051106276", -1, "0081 827 0998 0000 0200 51 106 276 M" }, /* DPDPLS Section 9.1 */
|
||||
/* 35*/ { BARCODE_DPD, UNICODE_MODE, -1, "008182709980000020052110276", -1, "0081 827 0998 0000 0200 52 110 276 W" }, /* DPDPLS Section 9.2 */
|
||||
/* 36*/ { BARCODE_DPD, UNICODE_MODE, -1, "008182709980000020053161276", -1, "0081 827 0998 0000 0200 53 161 276 O" }, /* DPDPLS Section 9.3 */
|
||||
/* 37*/ { BARCODE_DPD, UNICODE_MODE, -1, "008182709980000020054352276", -1, "0081 827 0998 0000 0200 54 352 276 B" }, /* DPDPLS Section 9.4 */
|
||||
/* 38*/ { BARCODE_DPD, UNICODE_MODE, -1, "008182709980000020055191276", -1, "0081 827 0998 0000 0200 55 191 276 A" }, /* DPDPLS Section 9.5 */
|
||||
/* 39*/ { BARCODE_DPD, UNICODE_MODE, -1, "008182709980000020056237276", -1, "0081 827 0998 0000 0200 56 237 276 K" }, /* DPDPLS Section 9.6 */
|
||||
/* BARCODE_GS1_128, BARCODE_EAN14, BARCODE_NVE18 hrt tested in test_gs1.c */
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
|
@ -221,7 +251,7 @@ static void test_hrt(const testCtx *const p_ctx) {
|
|||
symbol = ZBarcode_Create();
|
||||
assert_nonnull(symbol, "Symbol not created\n");
|
||||
|
||||
length = testUtilSetSymbol(symbol, data[i].symbology, data[i].input_mode, -1 /*eci*/, -1 /*option_1*/, -1, -1, -1 /*output_options*/, data[i].data, data[i].length, debug);
|
||||
length = testUtilSetSymbol(symbol, data[i].symbology, data[i].input_mode, -1 /*eci*/, -1 /*option_1*/, data[i].option_2, -1, -1 /*output_options*/, data[i].data, data[i].length, debug);
|
||||
|
||||
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
|
||||
assert_zero(ret, "i:%d ZBarcode_Encode ret %d != 0 %s\n", i, ret, symbol->errtxt);
|
||||
|
@ -635,6 +665,7 @@ static void test_dpd_input(const testCtx *const p_ctx) {
|
|||
int debug = p_ctx->debug;
|
||||
|
||||
struct item {
|
||||
int option_2;
|
||||
char *data;
|
||||
int ret;
|
||||
int expected_width;
|
||||
|
@ -642,12 +673,36 @@ static void test_dpd_input(const testCtx *const p_ctx) {
|
|||
char *comment;
|
||||
};
|
||||
struct item data[] = {
|
||||
/* 0*/ { "123456789012345678901234567", ZINT_ERROR_TOO_LONG, -1, "Error 349: DPD input wrong length (28 characters required)", "" },
|
||||
/* 1*/ { "12345678901234567890123456789", ZINT_ERROR_TOO_LONG, -1, "Error 349: DPD input wrong length (28 characters required)", "" },
|
||||
/* 2*/ { "123456789012345678901234567,", ZINT_ERROR_INVALID_DATA, -1, "Error 300: Invalid character in DPD data (alphanumerics only)", "Alphanumerics only in body" },
|
||||
/* 3*/ { ",234567890123456789012345678", 0, 211, "(19) 104 12 18 99 34 56 78 90 12 34 56 78 90 12 34 56 78 64 106", "Non-alphanumeric DPD Identifier (Barcode ID) allowed" },
|
||||
/* 4*/ { "\037234567890123456789012345678", ZINT_ERROR_INVALID_DATA, -1, "Error 343: Invalid DPD identifier (first character), ASCII values 32 to 127 only", "Control char <US> as DPD Identifier" },
|
||||
/* 5*/ { "é234567890123456789012345678", ZINT_ERROR_INVALID_DATA, -1, "Error 343: Invalid DPD identifier (first character), ASCII values 32 to 127 only", "Extended ASCII as DPD Identifier" },
|
||||
/* 0*/ { -1, "12345678901234567890123456", ZINT_ERROR_TOO_LONG, -1, "Error 349: DPD input wrong length (27 or 28 characters required)", "" },
|
||||
/* 1*/ { 1, "12345678901234567890123456", ZINT_ERROR_TOO_LONG, -1, "Error 830: DPD relabel input wrong length (27 characters required)", "" },
|
||||
/* 2*/ { -1, "123456789012345678901234567", 0, 211, "(19) 104 5 17 99 23 45 67 89 1 23 45 67 89 1 23 45 67 51 106", "27 chars ok now, ident tag prefixed" },
|
||||
/* 3*/ { -1, "%123456789012345678901234567", 0, 211, "(19) 104 5 17 99 23 45 67 89 1 23 45 67 89 1 23 45 67 51 106", "" },
|
||||
/* 4*/ { 1, "123456789012345678901234567", 0, 200, "(18) 105 12 34 56 78 90 12 34 56 78 90 12 34 56 100 23 102 106", "27 chars also ok (and necessary) for relabel" },
|
||||
/* 5*/ { -1, "12345678901234567890123456789", ZINT_ERROR_TOO_LONG, -1, "Error 349: DPD input wrong length (27 or 28 characters required)", "" },
|
||||
/* 6*/ { 1, "1234567890123456789012345678", ZINT_ERROR_TOO_LONG, -1, "Error 830: DPD relabel input wrong length (27 characters required)", "" },
|
||||
/* 7*/ { -1, "123456789012345678901234567,", ZINT_ERROR_INVALID_DATA, -1, "Error 299: Invalid character in data (alphanumerics only after first character)", "Alphanumerics only in body" },
|
||||
/* 8*/ { -1, "12345678901234567890123456,", ZINT_ERROR_INVALID_DATA, -1, "Error 300: Invalid character in data (alphanumerics only)", "Alphanumerics only in body" },
|
||||
/* 9*/ { -1, ",234567890123456789012345678", 0, 211, "(19) 104 12 18 99 34 56 78 90 12 34 56 78 90 12 34 56 78 64 106", "Non-alphanumeric DPD ident tag (Barcode ID) allowed" },
|
||||
/* 10*/ { -1, "\037234567890123456789012345678", ZINT_ERROR_INVALID_DATA, -1, "Error 343: Invalid DPD identification tag (first character), ASCII values 32 to 127 only", "Control char <US> as DPD ident tag" },
|
||||
/* 11*/ { -1, "é234567890123456789012345678", ZINT_ERROR_INVALID_DATA, -1, "Error 343: Invalid DPD identification tag (first character), ASCII values 32 to 127 only", "Extended ASCII as DPD ident tag" },
|
||||
/* 12*/ { -1, "12345678901234567890123456A", ZINT_WARN_NONCOMPLIANT, 222, "Warning 831: Destination Country Code (last 3 characters) should be numeric", "" },
|
||||
/* 13*/ { -1, "%12345678901234567890123456A", ZINT_WARN_NONCOMPLIANT, 222, "Warning 831: Destination Country Code (last 3 characters) should be numeric", "" },
|
||||
/* 14*/ { 1, "12345678901234567890123456A", ZINT_WARN_NONCOMPLIANT, 200, "Warning 831: Destination Country Code (last 3 characters) should be numeric", "" },
|
||||
/* 15*/ { -1, "123456789012345678901234A67", ZINT_WARN_NONCOMPLIANT, 233, "Warning 831: Destination Country Code (last 3 characters) should be numeric", "" },
|
||||
/* 16*/ { -1, "%123456789012345678901234A67", ZINT_WARN_NONCOMPLIANT, 233, "Warning 831: Destination Country Code (last 3 characters) should be numeric", "" },
|
||||
/* 17*/ { 1, "123456789012345678901234A67", ZINT_WARN_NONCOMPLIANT, 211, "Warning 831: Destination Country Code (last 3 characters) should be numeric", "" },
|
||||
/* 18*/ { -1, "12345678901234567890123A567", ZINT_WARN_NONCOMPLIANT, 244, "Warning 832: Service Code (characters 6-4 from end) should be numeric", "" },
|
||||
/* 19*/ { -1, "%12345678901234567890123A567", ZINT_WARN_NONCOMPLIANT, 244, "Warning 832: Service Code (characters 6-4 from end) should be numeric", "" },
|
||||
/* 20*/ { 1, "12345678901234567890123A567", ZINT_WARN_NONCOMPLIANT, 222, "Warning 832: Service Code (characters 6-4 from end) should be numeric", "" },
|
||||
/* 21*/ { -1, "123456789012345678901A34567", ZINT_WARN_NONCOMPLIANT, 244, "Warning 832: Service Code (characters 6-4 from end) should be numeric", "" },
|
||||
/* 22*/ { -1, "%123456789012345678901A34567", ZINT_WARN_NONCOMPLIANT, 244, "Warning 832: Service Code (characters 6-4 from end) should be numeric", "" },
|
||||
/* 23*/ { 1, "123456789012345678901A34567", ZINT_WARN_NONCOMPLIANT, 222, "Warning 832: Service Code (characters 6-4 from end) should be numeric", "" },
|
||||
/* 24*/ { -1, "12345678901234567890A234567", ZINT_WARN_NONCOMPLIANT, 233, "Warning 833: Last 10 characters of Tracking Number (characters 16-7 from end) should be numeric", "" },
|
||||
/* 25*/ { -1, "%12345678901234567890A234567", ZINT_WARN_NONCOMPLIANT, 233, "Warning 833: Last 10 characters of Tracking Number (characters 16-7 from end) should be numeric", "" },
|
||||
/* 26*/ { 1, "12345678901234567890A234567", ZINT_WARN_NONCOMPLIANT, 211, "Warning 833: Last 10 characters of Tracking Number (characters 16-7 from end) should be numeric", "" },
|
||||
/* 27*/ { -1, "12345678901A345678901234567", ZINT_WARN_NONCOMPLIANT, 244, "Warning 833: Last 10 characters of Tracking Number (characters 16-7 from end) should be numeric", "" },
|
||||
/* 28*/ { -1, "%12345678901A345678901234567", ZINT_WARN_NONCOMPLIANT, 244, "Warning 833: Last 10 characters of Tracking Number (characters 16-7 from end) should be numeric", "" },
|
||||
/* 29*/ { 1, "12345678901A345678901234567", ZINT_WARN_NONCOMPLIANT, 222, "Warning 833: Last 10 characters of Tracking Number (characters 16-7 from end) should be numeric", "" },
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
|
@ -666,14 +721,14 @@ static void test_dpd_input(const testCtx *const p_ctx) {
|
|||
|
||||
symbol->debug = ZINT_DEBUG_TEST; /* Needed to get codeword dump in errtxt */
|
||||
|
||||
length = testUtilSetSymbol(symbol, BARCODE_DPD, UNICODE_MODE, -1 /*eci*/, -1 /*option_1*/, -1, -1, -1 /*output_options*/, data[i].data, -1, debug);
|
||||
length = testUtilSetSymbol(symbol, BARCODE_DPD, UNICODE_MODE, -1 /*eci*/, -1 /*option_1*/, data[i].option_2, -1, -1 /*output_options*/, data[i].data, -1, debug);
|
||||
|
||||
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
|
||||
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
|
||||
|
||||
if (p_ctx->generate) {
|
||||
printf(" /*%3d*/ { \"%s\", %s, %d, \"%s\", \"%s\" },\n",
|
||||
i, testUtilEscape(data[i].data, length, escaped, sizeof(escaped)),
|
||||
printf(" /*%3d*/ { %d, \"%s\", %s, %d, \"%s\", \"%s\" },\n",
|
||||
i, data[i].option_2, testUtilEscape(data[i].data, length, escaped, sizeof(escaped)),
|
||||
testUtilErrorName(data[i].ret), symbol->width, symbol->errtxt, data[i].comment);
|
||||
} else {
|
||||
if (ret < ZINT_ERROR) {
|
||||
|
@ -694,6 +749,7 @@ static void test_encode(const testCtx *const p_ctx) {
|
|||
struct item {
|
||||
int symbology;
|
||||
int input_mode;
|
||||
int option_2;
|
||||
char *data;
|
||||
int ret;
|
||||
|
||||
|
@ -704,143 +760,159 @@ static void test_encode(const testCtx *const p_ctx) {
|
|||
char *expected;
|
||||
};
|
||||
/* BARCODE_GS1_128 examples verified manually against GS1 General Specifications 21.0.1 (GGS) */
|
||||
/* BARCODE_DPD examples Specification DPD and primetime Parcel Despatch (DPDAPPD) Version 4.0.2 */
|
||||
/* BARCODE_DPD examples Specification DPD and primetime Parcel Despatch (DPDAPPD) Version 4.0.2, also
|
||||
DPD Parcel Label Specification (DPDPLS) Version 2.4.1 (19.01.2021) */
|
||||
struct item data[] = {
|
||||
/* 0*/ { BARCODE_CODE128, UNICODE_MODE, "AIM", 0, 1, 68, 1, "ISO/IEC 15417:2007 Figure 1",
|
||||
/* 0*/ { BARCODE_CODE128, UNICODE_MODE, -1, "AIM", 0, 1, 68, 1, "ISO/IEC 15417:2007 Figure 1",
|
||||
"11010010000101000110001100010001010111011000101110110001100011101011"
|
||||
},
|
||||
/* 1*/ { BARCODE_CODE128B, UNICODE_MODE, "AIM", 0, 1, 68, 1, "128B same",
|
||||
/* 1*/ { BARCODE_CODE128B, UNICODE_MODE, -1, "AIM", 0, 1, 68, 1, "128B same",
|
||||
"11010010000101000110001100010001010111011000101110110001100011101011"
|
||||
},
|
||||
/* 2*/ { BARCODE_CODE128, UNICODE_MODE, "1234567890", 0, 1, 90, 1, "",
|
||||
/* 2*/ { BARCODE_CODE128, UNICODE_MODE, -1, "1234567890", 0, 1, 90, 1, "",
|
||||
"110100111001011001110010001011000111000101101100001010011011110110100111100101100011101011"
|
||||
},
|
||||
/* 3*/ { BARCODE_CODE128B, UNICODE_MODE, "1234567890", 0, 1, 145, 1, "",
|
||||
/* 3*/ { BARCODE_CODE128B, UNICODE_MODE, -1, "1234567890", 0, 1, 145, 1, "",
|
||||
"1101001000010011100110110011100101100101110011001001110110111001001100111010011101101110111010011001110010110010011101100101000110001100011101011"
|
||||
},
|
||||
/* 4*/ { BARCODE_CODE128, DATA_MODE, "\101\102\103\104\105\106\200\200\200\200\200", 0, 1, 178, 1, "",
|
||||
/* 4*/ { BARCODE_CODE128, DATA_MODE, -1, "\101\102\103\104\105\106\200\200\200\200\200", 0, 1, 178, 1, "",
|
||||
"1101000010010100011000100010110001000100011010110001000100011010001000110001011101011110111010111101010000110010100001100101000011001010000110010100001100110110110001100011101011"
|
||||
},
|
||||
/* 5*/ { BARCODE_GS1_128, GS1_MODE, "[8018]950110153123456781", 0, 1, 167, 1, "GGS Figure 2.5.2-1",
|
||||
/* 5*/ { BARCODE_GS1_128, GS1_MODE, -1, "[8018]950110153123456781", 0, 1, 167, 1, "GGS Figure 2.5.2-1",
|
||||
"11010011100111101011101010011110011001110010101111010001100110110011001000100101110011001101100011011101101110101110110001000010110010010111100101111001001100011101011"
|
||||
},
|
||||
/* 6*/ { BARCODE_GS1_128, GS1_MODE, "[415]5412345678908[3911]710125", 0, 1, 189, 1, "GGS Figure 2.6.6-1 top",
|
||||
/* 6*/ { BARCODE_GS1_128, GS1_MODE, -1, "[415]5412345678908[3911]710125", 0, 1, 189, 1, "GGS Figure 2.6.6-1 top",
|
||||
"110100111001111010111011000100010111010001101100010001011101101110101110110001000010110011011011110100011001001101000100011000100100100110100001100110110011100101100100001001101100011101011"
|
||||
},
|
||||
/* 7*/ { BARCODE_GS1_128, GS1_MODE, "[12]010425[8020]ABC123", 0, 1, 189, 1, "GGS Figure 2.6.6-1 bottom",
|
||||
/* 7*/ { BARCODE_GS1_128, GS1_MODE, -1, "[12]010425[8020]ABC123", 0, 1, 189, 1, "GGS Figure 2.6.6-1 bottom",
|
||||
"110100111001111010111010110011100110011011001001000110011100101100101001111001100100111010111101110101000110001000101100010001000110100111001101100111001011001011100110010111001100011101011"
|
||||
},
|
||||
/* 8*/ { BARCODE_GS1_128, GS1_MODE, "[253]950110153005812345678901", 0, 1, 211, 1, "GGS Figure 2.6.9-1",
|
||||
/* 8*/ { BARCODE_GS1_128, GS1_MODE, -1, "[253]950110153005812345678901", 0, 1, 211, 1, "GGS Figure 2.6.9-1",
|
||||
"1101001110011110101110111001011001101000100011000101110110001001001100110110011011101110110110011001110110001010110011100100010110001110001011011000010100110111101101011110111010011100110101110110001100011101011"
|
||||
},
|
||||
/* 9*/ { BARCODE_GS1_128, GS1_MODE, "[253]950110153006567890543210987", 0, 1, 211, 1, "GGS Figure 2.6.9-2",
|
||||
/* 9*/ { BARCODE_GS1_128, GS1_MODE, -1, "[253]950110153006567890543210987", 0, 1, 211, 1, "GGS Figure 2.6.9-2",
|
||||
"1101001110011110101110111001011001101000100011000101110110001001001100110110011011101110110110011001001011000010000101100110110111101000100110010110001110110111001001100100100011110010100101110011001100011101011"
|
||||
},
|
||||
/* 10*/ { BARCODE_GS1_128, GS1_MODE, "[253]95011015300657654321", 0, 1, 189, 1, "GGS Figure 2.6.9-3",
|
||||
/* 10*/ { BARCODE_GS1_128, GS1_MODE, -1, "[253]95011015300657654321", 0, 1, 189, 1, "GGS Figure 2.6.9-3",
|
||||
"110100111001111010111011100101100110100010001100010111011000100100110011011001101110111011011001100100101100001100101000011101011000110001101101011110111010011100110111001001101100011101011"
|
||||
},
|
||||
/* 11*/ { BARCODE_GS1_128, GS1_MODE, "[253]9501101530065123456", 0, 1, 167, 1, "GGS Figure 2.6.9-4",
|
||||
/* 11*/ { BARCODE_GS1_128, GS1_MODE, -1, "[253]9501101530065123456", 0, 1, 167, 1, "GGS Figure 2.6.9-4",
|
||||
"11010011100111101011101110010110011010001000110001011101100010010011001101100110111011101101100110010010110000101100111001000101100011100010110100011110101100011101011"
|
||||
},
|
||||
/* 12*/ { BARCODE_GS1_128, GS1_MODE, "[01]10857674002017[10]1152KMB", 0, 1, 211, 1, "GGS Figure 4.15.1-1",
|
||||
/* 12*/ { BARCODE_GS1_128, GS1_MODE, -1, "[01]10857674002017[10]1152KMB", 0, 1, 211, 1, "GGS Figure 4.15.1-1",
|
||||
"1101001110011110101110110011011001100100010010011110010110010100001000011001011011001100110010011101001110011011001000100110001001001101110001010111101110101100011101011101100010001011000100111001101100011101011"
|
||||
},
|
||||
/* 13*/ { BARCODE_GS1_128, GS1_MODE, "[01]09501101530003", 0, 1, 134, 1, "GGS Figure 5.1-3",
|
||||
/* 13*/ { BARCODE_GS1_128, GS1_MODE, -1, "[01]09501101530003", 0, 1, 134, 1, "GGS Figure 5.1-3",
|
||||
"11010011100111101011101100110110011001001000110001011101100010010011001101100110111011101101100110010010011000100110100001100011101011"
|
||||
},
|
||||
/* 14*/ { BARCODE_GS1_128, GS1_MODE, "[00]395123451234567895", 0, 1, 156, 1, "GGS Figure 5.4.2-1",
|
||||
/* 14*/ { BARCODE_GS1_128, GS1_MODE, -1, "[00]395123451234567895", 0, 1, 156, 1, "GGS Figure 5.4.2-1",
|
||||
"110100111001111010111011011001100110100010001101110100011101101110101110110001011001110010001011000111000101101100001010010111101000101111000101100011101011"
|
||||
},
|
||||
/* 15*/ { BARCODE_GS1_128, GS1_MODE, "[00]006141411234567890", 0, 1, 156, 1, "GGS Figure 6.6.5-1. (and Figures 6.6.5-3 bottom, 6.6.5-4 bottom)",
|
||||
/* 15*/ { BARCODE_GS1_128, GS1_MODE, -1, "[00]006141411234567890", 0, 1, 156, 1, "GGS Figure 6.6.5-1. (and Figures 6.6.5-3 bottom, 6.6.5-4 bottom)",
|
||||
"110100111001111010111011011001100110110011001100100001011000100010110001000101011001110010001011000111000101101100001010011011110110110110110001100011101011"
|
||||
},
|
||||
/* 16*/ { BARCODE_GS1_128, GS1_MODE, "[403]402621[401]950110153B01001", 0, 1, 266, 0, "GGS Figure 6.6.5-2 top **NOT SAME**, different encodation for zint, BWIPP & standard, same codeword count",
|
||||
/* 16*/ { BARCODE_GS1_128, GS1_MODE, -1, "[403]402621[401]950110153B01001", 0, 1, 266, 0, "GGS Figure 6.6.5-2 top **NOT SAME**, different encodation for zint, BWIPP & standard, same codeword count",
|
||||
"11010011100111101011101100010100010001011000110011001101111000101010111101110100111001101011101111011110101110110001010001100101110011000101110110001001001100110110011011101110101111011101000101100010011101100101110111101100100010011001101100101001111001100011101011"
|
||||
},
|
||||
/* 17*/ { BARCODE_GS1_128, GS1_MODE, "[00]395011015300000011", 0, 1, 156, 1, "GGS Figure 6.6.5-2 bottom",
|
||||
/* 17*/ { BARCODE_GS1_128, GS1_MODE, -1, "[00]395011015300000011", 0, 1, 156, 1, "GGS Figure 6.6.5-2 bottom",
|
||||
"110100111001111010111011011001100110100010001100010111011000100100110011011001101110111011011001100110110011001101100110011000100100100011101101100011101011"
|
||||
},
|
||||
/* 18*/ { BARCODE_GS1_128, GS1_MODE, "[420]45458", 0, 1, 90, 1, "GGS Figure 6.6.5-3 top",
|
||||
/* 18*/ { BARCODE_GS1_128, GS1_MODE, -1, "[420]45458", 0, 1, 90, 1, "GGS Figure 6.6.5-3 top",
|
||||
"110100111001111010111010110111000100100011001110101100011101100010111100100101100011101011"
|
||||
},
|
||||
/* 19*/ { BARCODE_GS1_128, GS1_MODE, "[02]00614141000418[15]210228[10]451214[37]20", 0, 1, 255, 1, "GGS Figure 6.6.5-4 top",
|
||||
/* 19*/ { BARCODE_GS1_128, GS1_MODE, -1, "[02]00614141000418[15]210228[10]451214[37]20", 0, 1, 255, 1, "GGS Figure 6.6.5-4 top",
|
||||
"110100111001111010111011001100110110110011001100100001011000100010110001000101101100110010010001100110011100101011100110011011100100110011001101110011010011001000100101110110001011001110010011001110111101011101000110100011001001110100011110101100011101011"
|
||||
},
|
||||
/* 20*/ { BARCODE_GS1_128, GS1_MODE, "[420]87109", 0, 1, 90, 1, "GGS Figure 6.6.5-5 top",
|
||||
/* 20*/ { BARCODE_GS1_128, GS1_MODE, -1, "[420]87109", 0, 1, 90, 1, "GGS Figure 6.6.5-5 top",
|
||||
"110100111001111010111010110111000100011001001001101000011001001000111001001101100011101011"
|
||||
},
|
||||
/* 21*/ { BARCODE_GS1_128, GS1_MODE, "[90]1528", 0, 1, 79, 1, "GGS Figure 6.6.5-5 middle",
|
||||
/* 21*/ { BARCODE_GS1_128, GS1_MODE, -1, "[90]1528", 0, 1, 79, 1, "GGS Figure 6.6.5-5 middle",
|
||||
"1101001110011110101110110111101101011100110011100110100111001100101100011101011"
|
||||
},
|
||||
/* 22*/ { BARCODE_GS1_128, GS1_MODE, "[00]000521775138957172", 0, 1, 156, 1, "GGS Figure 6.6.5-5 bottom",
|
||||
/* 22*/ { BARCODE_GS1_128, GS1_MODE, -1, "[00]000521775138957172", 0, 1, 156, 1, "GGS Figure 6.6.5-5 bottom",
|
||||
"110100111001111010111011011001100110110011001000100110011011100100111101110101101110100010001100010101111010001001101000010011000010110011011001100011101011"
|
||||
},
|
||||
/* 23*/ { BARCODE_GS1_128, GS1_MODE, "[00]395011010013000129", 0, 1, 156, 1, "GGS Figure 6.6.5-6",
|
||||
/* 23*/ { BARCODE_GS1_128, GS1_MODE, -1, "[00]395011010013000129", 0, 1, 156, 1, "GGS Figure 6.6.5-6",
|
||||
"110100111001111010111011011001100110100010001100010111011000100100110011011001101100110010011011100110110011001100110110011100110010111101101101100011101011"
|
||||
},
|
||||
/* 24*/ { BARCODE_GS1_128, GS1_MODE, "[00]395011010013000129", 0, 1, 156, 1, "GGS Figure 6.6.5-6",
|
||||
/* 24*/ { BARCODE_GS1_128, GS1_MODE, -1, "[00]395011010013000129", 0, 1, 156, 1, "GGS Figure 6.6.5-6",
|
||||
"110100111001111010111011011001100110100010001100010111011000100100110011011001101100110010011011100110110011001100110110011100110010111101101101100011101011"
|
||||
},
|
||||
/* 25*/ { BARCODE_GS1_128, GS1_MODE, "[401]931234518430GR", 0, 1, 167, 1, "GGS Figure 6.6.5-7 top",
|
||||
/* 25*/ { BARCODE_GS1_128, GS1_MODE, -1, "[401]931234518430GR", 0, 1, 167, 1, "GGS Figure 6.6.5-7 top",
|
||||
"11010011100111101011101100010100011001011100110110001101110110111010111011000110011100101011000111010111101110100111011001101000100011000101110100110111001100011101011"
|
||||
},
|
||||
/* 26*/ { BARCODE_GS1_128, GS1_MODE, "[00]093123450000000012", 0, 1, 156, 1, "GGS Figure 6.6.5-7 bottom",
|
||||
/* 26*/ { BARCODE_GS1_128, GS1_MODE, -1, "[00]093123450000000012", 0, 1, 156, 1, "GGS Figure 6.6.5-7 bottom",
|
||||
"110100111001111010111011011001100110010010001101100011011101101110101110110001101100110011011001100110110011001101100110010110011100110111010001100011101011"
|
||||
},
|
||||
/* 27*/ { BARCODE_GS1_128, GS1_MODE, "[01]95012345678903", 0, 1, 134, 1, "GGS Figure 7.8.5.1-1 1st",
|
||||
/* 27*/ { BARCODE_GS1_128, GS1_MODE, -1, "[01]95012345678903", 0, 1, 134, 1, "GGS Figure 7.8.5.1-1 1st",
|
||||
"11010011100111101011101100110110010111101000110011011001110110111010111011000100001011001101101111010010011000110110001101100011101011"
|
||||
},
|
||||
/* 28*/ { BARCODE_GS1_128, GS1_MODE, "[3102]000400", 0, 1, 101, 1, "GGS Figure 7.8.5.1-1 2nd",
|
||||
/* 28*/ { BARCODE_GS1_128, GS1_MODE, -1, "[3102]000400", 0, 1, 101, 1, "GGS Figure 7.8.5.1-1 2nd",
|
||||
"11010011100111101011101101100011011001100110110110011001001000110011011001100110110111101100011101011"
|
||||
},
|
||||
/* 29*/ { BARCODE_GS1_128, GS1_MODE, "[01]95012345678903[3102]000400", 0, 1, 189, 1, "GGS Figure 7.8.5.1-2",
|
||||
/* 29*/ { BARCODE_GS1_128, GS1_MODE, -1, "[01]95012345678903[3102]000400", 0, 1, 189, 1, "GGS Figure 7.8.5.1-2",
|
||||
"110100111001111010111011001101100101111010001100110110011101101110101110110001000010110011011011110100100110001101100011011001100110110110011001001000110011011001100100100110001100011101011"
|
||||
},
|
||||
/* 30*/ { BARCODE_GS1_128, GS1_MODE, "[8005]000365", 0, 1, 101, 1, "GGS Figure 7.8.5.2-1 1st",
|
||||
/* 30*/ { BARCODE_GS1_128, GS1_MODE, -1, "[8005]000365", 0, 1, 101, 1, "GGS Figure 7.8.5.2-1 1st",
|
||||
"11010011100111101011101010011110010001001100110110011001001001100010010110000100100001101100011101011"
|
||||
},
|
||||
/* 31*/ { BARCODE_GS1_128, GS1_MODE, "[10]123456", 0, 1, 90, 1, "GGS Figure 7.8.5.2-1 2nd",
|
||||
/* 31*/ { BARCODE_GS1_128, GS1_MODE, -1, "[10]123456", 0, 1, 90, 1, "GGS Figure 7.8.5.2-1 2nd",
|
||||
"110100111001111010111011001000100101100111001000101100011100010110110010000101100011101011"
|
||||
},
|
||||
/* 32*/ { BARCODE_GS1_128, GS1_MODE, "[8005]000365[10]123456", 0, 1, 156, 1, "GGS Figure 7.8.5.2-2",
|
||||
/* 32*/ { BARCODE_GS1_128, GS1_MODE, -1, "[8005]000365[10]123456", 0, 1, 156, 1, "GGS Figure 7.8.5.2-2",
|
||||
"110100111001111010111010100111100100010011001101100110010010011000100101100001111010111011001000100101100111001000101100011100010110101100001001100011101011"
|
||||
},
|
||||
/* 33*/ { BARCODE_GS1_128, GS1_MODE, "[403]27653113+99000900090010", 0, 1, 222, 1, "DHL Leitcode https://www.dhl.de/de/geschaeftskunden/paket/information/geschaeftskunden/abrechnung/leitcodierung.html",
|
||||
/* 33*/ { BARCODE_GS1_128, GS1_MODE, -1, "[403]27653113+99000900090010", 0, 1, 222, 1, "DHL Leitcode https://www.dhl.de/de/geschaeftskunden/paket/information/geschaeftskunden/abrechnung/leitcodierung.html",
|
||||
"110100111001111010111011000101000110001101101100101000011011101110110001001001011110111011001011100110001001001011101111010111011110110110011001100100100011011001100110010010001101100110011001000100110001000101100011101011"
|
||||
},
|
||||
/* 34*/ { BARCODE_GS1_128, GS1_MODE, "[00]340433935039756615", 0, 1, 156, 1, "DHL Identcode https://www.dhl.de/de/geschaeftskunden/paket/information/geschaeftskunden/abrechnung/leitcodierung.html",
|
||||
/* 34*/ { BARCODE_GS1_128, GS1_MODE, -1, "[00]340433935039756615", 0, 1, 156, 1, "DHL Identcode https://www.dhl.de/de/geschaeftskunden/paket/information/geschaeftskunden/abrechnung/leitcodierung.html",
|
||||
"110100111001111010111011011001100100010110001001000110010100011000101000111101100010111011010001000110000100101001000011010111001100100111001101100011101011"
|
||||
},
|
||||
/* 35*/ { BARCODE_GS1_128, GS1_MODE, "[90]ABCDEfGHI", 0, 1, 167, 0, "Shift A; BWIPP different encodation, same codeword count",
|
||||
/* 35*/ { BARCODE_GS1_128, GS1_MODE, -1, "[90]ABCDEfGHI", 0, 1, 167, 0, "Shift A; BWIPP different encodation, same codeword count",
|
||||
"11010010000111101011101110010110010011101100101000110001000101100010001000110101100010001000110100010110000100110100010001100010100011000100010110010011101100011101011"
|
||||
},
|
||||
/* 36*/ { BARCODE_GS1_128, GS1_MODE, "[01]12345678901231[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890123456789012345678901234", 0, 1, 684, 1, "Max length",
|
||||
/* 36*/ { BARCODE_GS1_128, GS1_MODE, -1, "[01]12345678901231[90]123456789012345678901234567890[91]1234567890123456789012345678901234567890123456789012345678901234", 0, 1, 684, 1, "Max length",
|
||||
"110100111001111010111011001101100101100111001000101100011100010110110000101001101111011010110011100110110001101101111011010110011100100010110001110001011011000010100110111101101011001110010001011000111000101101100001010011011110110101100111001000101100011100010110110000101001101111011011110101110111101101101011001110010001011000111000101101100001010011011110110101100111001000101100011100010110110000101001101111011010110011100100010110001110001011011000010100110111101101011001110010001011000111000101101100001010011011110110101100111001000101100011100010110110000101001101111011010110011100100010110001110001011011000010100110111101101011001110010001011000100011110101100011101011"
|
||||
},
|
||||
/* 37*/ { BARCODE_EAN14, GS1_MODE, "4070071967072", 0, 1, 134, 1, "Verified manually against tec-it",
|
||||
/* 37*/ { BARCODE_EAN14, GS1_MODE, -1, "4070071967072", 0, 1, 134, 1, "Verified manually against tec-it",
|
||||
"11010011100111101011101100110110011000101000101100001001001100010011001011100100001011001001100010011001001110110111001001100011101011"
|
||||
},
|
||||
/* 38*/ { BARCODE_NVE18, GS1_MODE, "40700000071967072", 0, 1, 156, 1, "Verified manually against tec-it",
|
||||
/* 38*/ { BARCODE_NVE18, GS1_MODE, -1, "40700000071967072", 0, 1, 156, 1, "Verified manually against tec-it",
|
||||
"110100111001111010111011011001100110001010001011000010011011001100110110011001001100010011001011100100001011001001100010011001001110110111011101100011101011"
|
||||
},
|
||||
/* 39*/ { BARCODE_HIBC_128, UNICODE_MODE, "83278F8G9H0J2G", 0, 1, 211, 1, "ANSI/HIBC 2.6 - 2016 Section 4.1, not same, uses different encoding (eg begins StartA instead of StartB)",
|
||||
/* 39*/ { BARCODE_HIBC_128, UNICODE_MODE, -1, "83278F8G9H0J2G", 0, 1, 211, 1, "ANSI/HIBC 2.6 - 2016 Section 4.1, not same, uses different encoding (eg begins StartA instead of StartB)",
|
||||
"1101001000011000100100111010011001011101111011000110110110000101001011110111010001100010111010011001101000100011100101100110001010001001110110010110111000110011100101101000100010001001100111101010001100011101011"
|
||||
},
|
||||
/* 40*/ { BARCODE_HIBC_128, UNICODE_MODE, "A123BJC5D6E71", 0, 1, 200, 1, "ANSI/HIBC 2.6 - 2016 Figure 1, same",
|
||||
/* 40*/ { BARCODE_HIBC_128, UNICODE_MODE, -1, "A123BJC5D6E71", 0, 1, 200, 1, "ANSI/HIBC 2.6 - 2016 Figure 1, same",
|
||||
"11010010000110001001001010001100010011100110110011100101100101110010001011000101101110001000100011011011100100101100010001100111010010001101000111011011101001110011011010001000110001101101100011101011"
|
||||
},
|
||||
/* 41*/ { BARCODE_HIBC_128, UNICODE_MODE, "$$52001510X3G", 0, 1, 178, 1, "ANSI/HIBC 2.6 - 2016 Figure 5, same",
|
||||
/* 41*/ { BARCODE_HIBC_128, UNICODE_MODE, -1, "$$52001510X3G", 0, 1, 178, 1, "ANSI/HIBC 2.6 - 2016 Figure 5, same",
|
||||
"1101001000011000100100100100011001001000110010111011110110111000101101100110010111001100110010001001011110111011100010110110010111001101000100010110001000100011110101100011101011"
|
||||
},
|
||||
/* 42*/ { BARCODE_DPD, UNICODE_MODE, "%000393206219912345678101040", 0, 1, 211, 1, "DPDAPPD 4.0.2 - Illustrations 2, 7, 8, same; NOTE: correct HRT given by Illustration 7 only",
|
||||
/* 42*/ { BARCODE_DPD, UNICODE_MODE, -1, "%000393206219912345678101040", 0, 1, 211, 1, "DPDAPPD 4.0.2 - Illustrations 2, 7, 8, same; NOTE: correct HRT given by Illustration 7 only",
|
||||
"1101001000010001001100100111011001011101111011011001100110100010001100011011010011001000110111001001011101111010110011100100010110001110001011011000010100110010001001100100010011000101000101011110001100011101011"
|
||||
},
|
||||
/* 43*/ { BARCODE_DPD, UNICODE_MODE, "%007110601782532948375101276", 0, 1, 211, 1, "DPDAPPD 4.0.2 - Illustration 6 **NOT SAME** HRT incorrect, also uses CodeA and inefficient encoding; verified against tec-it",
|
||||
/* 43*/ { BARCODE_DPD, UNICODE_MODE, -1, "%007110601782532948375101276", 0, 1, 211, 1, "DPDAPPD 4.0.2 - Illustration 6 **NOT SAME** HRT incorrect, also uses CodeA and inefficient encoding; verified against tec-it",
|
||||
"1101001000010001001100100111011001011101111010011000100110001001001001100100011001101100110000101001110010110011000110110100010111101011110010011000010010110010001001011001110011001010000100010111101100011101011"
|
||||
},
|
||||
/* 44*/ { BARCODE_DPD, UNICODE_MODE, "0123456789012345678901234567", 0, 1, 189, 1, "DPDAPPD 4.0.2 - Illustration 9, same (allowing for literal HRT)",
|
||||
/* 44*/ { BARCODE_DPD, UNICODE_MODE, -1, "0123456789012345678901234567", 0, 1, 189, 1, "DPDAPPD 4.0.2 - Illustration 9, same (allowing for literal HRT)",
|
||||
"110100111001100110110011101101110101110110001000010110011011011110110011011001110110111010111011000100001011001101101111011001101100111011011101011101100010000101100101011110001100011101011"
|
||||
},
|
||||
/* 45*/ { BARCODE_DPD, UNICODE_MODE, -1, "008182709980000020028101276", 0, 1, 211, 1, "DPDPLS Section 4, **NOT SAME**, figure switches to CodeC after 1st char (%), zint after 2nd (0)",
|
||||
"1101001000010001001100100111011001011101111010001100100110011100101110110010011001001000111101000101101100110011011001100110011001101101100110011100110100110010001001011001110011001010000101011110001100011101011"
|
||||
},
|
||||
/* 46*/ { BARCODE_DPD, UNICODE_MODE, -1, "007110601632532948375179276", 0, 1, 211, 1, "DPDPLS Section 4.6, **NOT SAME**, figure StartA & switches as above, zint StartB & switches as above",
|
||||
"1101001000010001001100100111011001011101111010011000100110001001001001100100011001101100101001100001110010110011000110110100010111101011110010011000010010100111001101010111100011001010000101100010001100011101011"
|
||||
},
|
||||
/* 47*/ { BARCODE_DPD, UNICODE_MODE, -1, "001990009980000020084109203", 0, 1, 211, 1, "DPDPLS Section 5.1, **NOT SAME**, figure switches to CodeC after 1st char (%), zint after 2nd (0)",
|
||||
"1101001000010001001100100111011001011101111011001101100101110111101101100110011001001000111101000101101100110011011001100110011001101101100110010011110100110010001001010111100010010011000100011010001100011101011"
|
||||
},
|
||||
/* 48*/ { BARCODE_DPD, UNICODE_MODE, -1, "008182709980000020029136276", 0, 1, 211, 1, "DPDPLS Section 6.1, **NOT SAME**, as above",
|
||||
"1101001000010001001100100111011001011101111010001100100110011100101110110010011001001000111101000101101100110011011001100110011001101101100110011100110010100110111001111000101011001010000100001101001100011101011"
|
||||
},
|
||||
/* 49*/ { BARCODE_DPD, UNICODE_MODE, 1, "006376209980000020044118276", 0, 1, 200, 1, "DPDPLS Section 8.7.2 relabel, **NOT SAME**, figure begins StartB then immediate CodeC, zint just StartC",
|
||||
"11010011100110110011001010011000011001010000110010011101011101111010100111100110110011001101100110011001001110100100011001100010001011001110010111011001001011110111011001110100110111011101100011101011"
|
||||
},
|
||||
};
|
||||
int data_size = ARRAY_SIZE(data);
|
||||
int i, length, ret;
|
||||
|
@ -862,14 +934,15 @@ static void test_encode(const testCtx *const p_ctx) {
|
|||
symbol = ZBarcode_Create();
|
||||
assert_nonnull(symbol, "Symbol not created\n");
|
||||
|
||||
length = testUtilSetSymbol(symbol, data[i].symbology, data[i].input_mode, -1 /*eci*/, -1 /*option_1*/, -1, -1, -1 /*output_options*/, data[i].data, -1, debug);
|
||||
length = testUtilSetSymbol(symbol, data[i].symbology, data[i].input_mode, -1 /*eci*/, -1 /*option_1*/, data[i].option_2, -1, -1 /*output_options*/, data[i].data, -1, debug);
|
||||
|
||||
ret = ZBarcode_Encode(symbol, (unsigned char *) data[i].data, length);
|
||||
assert_equal(ret, data[i].ret, "i:%d ZBarcode_Encode ret %d != %d (%s)\n", i, ret, data[i].ret, symbol->errtxt);
|
||||
|
||||
if (p_ctx->generate) {
|
||||
printf(" /*%3d*/ { %s, %s, \"%s\", %s, %d, %d, %d, \"%s\",\n",
|
||||
i, testUtilBarcodeName(data[i].symbology), testUtilInputModeName(data[i].input_mode), testUtilEscape(data[i].data, length, escaped, sizeof(escaped)),
|
||||
printf(" /*%3d*/ { %s, %s, %d, \"%s\", %s, %d, %d, %d, \"%s\",\n",
|
||||
i, testUtilBarcodeName(data[i].symbology), testUtilInputModeName(data[i].input_mode), data[i].option_2,
|
||||
testUtilEscape(data[i].data, length, escaped, sizeof(escaped)),
|
||||
testUtilErrorName(data[i].ret), symbol->rows, symbol->width, data[i].bwipp_cmp, data[i].comment);
|
||||
testUtilModulesPrint(symbol, " ", "\n");
|
||||
printf(" },\n");
|
||||
|
@ -883,11 +956,11 @@ static void test_encode(const testCtx *const p_ctx) {
|
|||
ret = testUtilModulesCmp(symbol, data[i].expected, &width, &row);
|
||||
assert_zero(ret, "i:%d testUtilModulesCmp ret %d != 0 width %d row %d (%s)\n", i, ret, width, row, data[i].data);
|
||||
|
||||
if (do_bwipp && testUtilCanBwipp(i, symbol, -1, -1, -1, debug)) {
|
||||
if (do_bwipp && testUtilCanBwipp(i, symbol, -1, data[i].option_2, -1, debug)) {
|
||||
if (!data[i].bwipp_cmp) {
|
||||
if (debug & ZINT_DEBUG_TEST_PRINT) printf("i:%d %s not BWIPP compatible (%s)\n", i, testUtilBarcodeName(symbol->symbology), data[i].comment);
|
||||
} else {
|
||||
ret = testUtilBwipp(i, symbol, -1, -1, -1, data[i].data, length, NULL, cmp_buf, sizeof(cmp_buf), NULL);
|
||||
ret = testUtilBwipp(i, symbol, -1, data[i].option_2, -1, data[i].data, length, NULL, cmp_buf, sizeof(cmp_buf), NULL);
|
||||
assert_zero(ret, "i:%d %s testUtilBwipp ret %d != 0\n", i, testUtilBarcodeName(symbol->symbology), ret);
|
||||
|
||||
ret = testUtilBwippCmp(symbol, cmp_msg, cmp_buf, data[i].expected);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue