diff --git a/ChangeLog b/ChangeLog
index 8da1ffe4..6a7982a3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -126,11 +126,14 @@ Bugs
in `gs1_verify()` on not checking length, ticket #300, props Andre Maute
- GS1_128_CC: fix divide-by-zero crash in `calc_padding_ccc()`, ticket #300,
props Andre Maute
+- HANXIN: fix incorrect numeric costings (out-by-1) in `hx_in_numeric()`, ticket
+ #300 (#16), props Andre Maure
- PDF417: fix out-of-bounds crash in `pdf_text_submode_length()` and
out-of-bounds crash on overrunning string and codeword buffers, ticket #300,
props Andre Maute
- QRCODE: fix out-of-bounds crash due to incorrect mode costings for GS1
- percents in `qr_in_alpha()`, ticket #300, props Andre Maute
+ percents in `qr_in_alpha()`; fix incorrect numeric costings (out-by-1) in
+ `qr_in_numeric()`; ticket #300 (#14, #15; #16), props Andre Maute
Version 2.12.0 (2022-12-12)
diff --git a/backend/hanxin.c b/backend/hanxin.c
index ead83d4c..12be1d61 100644
--- a/backend/hanxin.c
+++ b/backend/hanxin.c
@@ -308,7 +308,7 @@ static int hx_in_numeric(const unsigned int ddata[], const int length, const int
}
/* Attempt to calculate the average 'cost' of using numeric mode in number of bits (times HX_MULT) */
- for (i = in_posn; i < length && i < in_posn + 4 && z_isdigit(ddata[i]); i++);
+ for (i = in_posn; i < length && i < in_posn + 3 && z_isdigit(ddata[i]); i++);
digit_cnt = i - in_posn;
@@ -548,7 +548,7 @@ static void hx_calculate_binary(char binary[], const char mode[], const unsigned
bp = bin_append_posn(1, 4, binary, bp);
if (debug_print) {
- fputs("Numeric\n", stdout);
+ printf("Numeric (N%d): ", block_length);
}
count = 0; /* Suppress gcc -Wmaybe-uninitialized */
@@ -574,7 +574,7 @@ static void hx_calculate_binary(char binary[], const char mode[], const unsigned
bp = bin_append_posn(encoding_value, 10, binary, bp);
if (debug_print) {
- printf("0x%3x (%d)", encoding_value, encoding_value);
+ printf(" 0x%3x(%d)", encoding_value, encoding_value);
}
i += count;
@@ -604,7 +604,7 @@ static void hx_calculate_binary(char binary[], const char mode[], const unsigned
bp = bin_append_posn(2, 4, binary, bp);
if (debug_print) {
- fputs("Text\n", stdout);
+ printf("Text (T%d):", block_length);
}
submode = 1;
@@ -618,7 +618,7 @@ static void hx_calculate_binary(char binary[], const char mode[], const unsigned
bp = bin_append_posn(62, 6, binary, bp);
submode = hx_getsubmode(ddata[i + position]);
if (debug_print) {
- fputs("SWITCH ", stdout);
+ fputs(" SWITCH", stdout);
}
}
@@ -631,7 +631,7 @@ static void hx_calculate_binary(char binary[], const char mode[], const unsigned
bp = bin_append_posn(encoding_value, 6, binary, bp);
if (debug_print) {
- printf("%.2x [ASC %.2x] ", encoding_value, ddata[i + position]);
+ printf(" %.2x[ASC %.2x]", encoding_value, ddata[i + position]);
}
i++;
}
@@ -652,7 +652,7 @@ static void hx_calculate_binary(char binary[], const char mode[], const unsigned
bp = bin_append_posn(block_length + double_byte, 13, binary, bp);
if (debug_print) {
- printf("Binary Mode (%d):", block_length + double_byte);
+ printf("Binary Mode (B%d):", block_length + double_byte);
}
i = 0;
@@ -681,7 +681,8 @@ static void hx_calculate_binary(char binary[], const char mode[], const unsigned
}
if (debug_print) {
- printf("Region One%s\n", position == 0 || mode[position - 1] != '2' ? "" : " (NO indicator)" );
+ printf("Region One%s H(1)%d:",
+ position == 0 || mode[position - 1] != '2' ? "" : " (NO indicator)", block_length);
}
i = 0;
@@ -706,7 +707,7 @@ static void hx_calculate_binary(char binary[], const char mode[], const unsigned
}
if (debug_print) {
- printf("%.3x [GB %.4x] ", glyph, ddata[i + position]);
+ printf(" %.3x[GB %.4x]", glyph, ddata[i + position]);
}
bp = bin_append_posn(glyph, 12, binary, bp);
@@ -718,7 +719,7 @@ static void hx_calculate_binary(char binary[], const char mode[], const unsigned
? 4095 : 4094, 12, binary, bp);
if (debug_print) {
- printf("(TERM %x)\n", position + block_length == length || mode[position + block_length] != '2'
+ printf(" (TERM %x)\n", position + block_length == length || mode[position + block_length] != '2'
? 4095 : 4094);
}
@@ -731,7 +732,8 @@ static void hx_calculate_binary(char binary[], const char mode[], const unsigned
}
if (debug_print) {
- printf("Region Two%s\n", position == 0 || mode[position - 1] != '1' ? "" : " (NO indicator)" );
+ printf("Region Two%s H(2)%d:",
+ position == 0 || mode[position - 1] != '1' ? "" : " (NO indicator)", block_length);
}
i = 0;
@@ -743,7 +745,7 @@ static void hx_calculate_binary(char binary[], const char mode[], const unsigned
glyph = (0x5e * (first_byte - 0xd8)) + (second_byte - 0xa1);
if (debug_print) {
- printf("%.3x [GB %.4x] ", glyph, ddata[i + position]);
+ printf(" %.3x[GB %.4x]", glyph, ddata[i + position]);
}
bp = bin_append_posn(glyph, 12, binary, bp);
@@ -755,7 +757,7 @@ static void hx_calculate_binary(char binary[], const char mode[], const unsigned
? 4095 : 4094, 12, binary, bp);
if (debug_print) {
- printf("(TERM %x)\n", position + block_length == length || mode[position + block_length] != '1'
+ printf(" (TERM %x)\n", position + block_length == length || mode[position + block_length] != '1'
? 4095 : 4094);
}
@@ -766,7 +768,7 @@ static void hx_calculate_binary(char binary[], const char mode[], const unsigned
bp = bin_append_posn(6, 4, binary, bp);
if (debug_print) {
- fputs("Double byte\n", stdout);
+ printf("Double byte (H(d)%d):", block_length);
}
i = 0;
@@ -801,7 +803,7 @@ static void hx_calculate_binary(char binary[], const char mode[], const unsigned
case 'f':
/* Four-byte encoding */
if (debug_print) {
- fputs("Four byte\n", stdout);
+ printf("Four byte (H(f)%d):", block_length);
}
i = 0;
@@ -820,7 +822,7 @@ static void hx_calculate_binary(char binary[], const char mode[], const unsigned
(0x0a * (third_byte - 0x81)) + (fourth_byte - 0x30);
if (debug_print) {
- printf("%d ", glyph);
+ printf(" %d", glyph);
}
bp = bin_append_posn(glyph, 21, binary, bp);
@@ -1554,7 +1556,7 @@ INTERNAL int hanxin(struct zint_symbol *symbol, struct zint_seg segs[], const in
codewords++;
}
if (debug_print) {
- printf("Num. of codewords: %d\n", codewords);
+ printf("Num. of codewords: %d (%d padbits)\n", codewords, bin_len & 0x07);
}
version = 85;
diff --git a/backend/qr.c b/backend/qr.c
index c745a37d..68f8251d 100644
--- a/backend/qr.c
+++ b/backend/qr.c
@@ -77,7 +77,7 @@ static int qr_in_numeric(const unsigned int ddata[], const int length, const int
}
/* Attempt to calculate the average 'cost' of using numeric mode in number of bits (times QR_MULT) */
- for (i = in_posn; i < length && i < in_posn + 4 && z_isdigit(ddata[i]); i++);
+ for (i = in_posn; i < length && i < in_posn + 3 && z_isdigit(ddata[i]); i++);
digit_cnt = i - in_posn;
@@ -302,11 +302,15 @@ static void qr_define_mode(char mode[], const unsigned int ddata[], const int le
}
#ifdef QR_DEBUG_DEFINE_MODE
- printf(" % 4d: curr", i);
- for (j = 0; j < QR_NUM_MODES; j++) {
- printf(" %c(%c)=%d", qr_mode_types[j], char_modes[cm_i + j], cur_costs[j]);
+ {
+ int min_j = 0;
+ printf(" % 4d: curr", i);
+ for (j = 0; j < QR_NUM_MODES; j++) {
+ printf(" %c(%c)=%d", qr_mode_types[j], char_modes[cm_i + j], cur_costs[j]);
+ if (cur_costs[j] < cur_costs[min_j]) min_j = j;
+ }
+ printf(" min %c(%c)=%d\n", qr_mode_types[min_j], char_modes[cm_i + min_j], cur_costs[min_j]);
}
- printf("\n");
#endif
memcpy(prev_costs, cur_costs, QR_NUM_MODES * sizeof(unsigned int));
}
@@ -762,7 +766,7 @@ static int qr_binary_segs(unsigned char datastream[], const int version, const i
}
if (debug_print) {
- fputs("Resulting codewords:\n\t", stdout);
+ printf("Resulting codewords (%d):\n\t", target_codewords);
for (i = 0; i < target_codewords; i++) {
printf("0x%02X ", datastream[i]);
}
@@ -867,7 +871,7 @@ static void qr_add_ecc(unsigned char fullstream[], const unsigned char datastrea
}
if (debug_print) {
- fputs("\nData Stream: \n", stdout);
+ printf("\nData Stream (%d): \n", data_cw + ecc_cw);
for (j = 0; j < (data_cw + ecc_cw); j++) {
printf("%2X ", fullstream[j]);
}
diff --git a/backend/tests/test_hanxin.c b/backend/tests/test_hanxin.c
index 625dd8cf..3d5aad39 100644
--- a/backend/tests/test_hanxin.c
+++ b/backend/tests/test_hanxin.c
@@ -75,6 +75,12 @@ static void test_large(const testCtx *const p_ctx) {
char data_buf[7829];
+ char escaped[8196];
+ char cmp_buf[32768];
+ char cmp_msg[8196];
+
+ int do_zxingcpp = (debug & ZINT_DEBUG_TEST_ZXINGCPP) && testUtilHaveZXingCPPDecoder(); /* Only do ZXing-C++ test if asked, too slow otherwise */
+
testStartSymbol("test_large", &symbol);
for (i = 0; i < data_size; i++) {
@@ -95,6 +101,18 @@ static void test_large(const testCtx *const p_ctx) {
if (ret < ZINT_ERROR) {
assert_equal(symbol->rows, data[i].expected_rows, "i:%d symbol->rows %d != %d\n", i, symbol->rows, data[i].expected_rows);
assert_equal(symbol->width, data[i].expected_width, "i:%d symbol->width %d != %d\n", i, symbol->width, data[i].expected_width);
+
+ if (do_zxingcpp && testUtilCanZXingCPP(i, symbol, data_buf, length, debug)) {
+ int cmp_len, ret_len;
+ char modules_dump[189 * 189 + 1];
+ assert_notequal(testUtilModulesDump(symbol, modules_dump, sizeof(modules_dump)), -1, "i:%d testUtilModulesDump == -1\n", i);
+ ret = testUtilZXingCPP(i, symbol, data_buf, length, modules_dump, cmp_buf, sizeof(cmp_buf), &cmp_len);
+ assert_zero(ret, "i:%d %s testUtilZXingCPP ret %d != 0\n", i, testUtilBarcodeName(symbol->symbology), ret);
+
+ ret = testUtilZXingCPPCmp(symbol, cmp_msg, cmp_buf, cmp_len, data_buf, length, NULL /*primary*/, escaped, &ret_len);
+ assert_zero(ret, "i:%d %s testUtilZXingCPPCmp %d != 0 %s\n actual: %.*s\nexpected: %.*s\n",
+ i, testUtilBarcodeName(symbol->symbology), ret, cmp_msg, cmp_len, cmp_buf, ret_len, escaped);
+ }
}
ZBarcode_Delete(symbol);
@@ -133,6 +151,12 @@ static void test_options(const testCtx *const p_ctx) {
int i, length, ret;
struct zint_symbol *symbol = NULL;
+ char escaped[1024];
+ char cmp_buf[32768];
+ char cmp_msg[1024];
+
+ int do_zxingcpp = (debug & ZINT_DEBUG_TEST_ZXINGCPP) && testUtilHaveZXingCPPDecoder(); /* Only do ZXing-C++ test if asked, too slow otherwise */
+
testStartSymbol("test_options", &symbol);
for (i = 0; i < data_size; i++) {
@@ -153,6 +177,19 @@ static void test_options(const testCtx *const p_ctx) {
assert_equal(symbol->width, data[i].expected_size, "i:%d symbol->width %d != %d\n", i, symbol->width, data[i].expected_size);
assert_equal(symbol->rows, data[i].expected_size, "i:%d symbol->rows %d != %d\n", i, symbol->rows, data[i].expected_size);
}
+ if (ret < ZINT_ERROR) {
+ if (do_zxingcpp && testUtilCanZXingCPP(i, symbol, data[i].data, length, debug)) {
+ int cmp_len, ret_len;
+ char modules_dump[189 * 189 + 1];
+ assert_notequal(testUtilModulesDump(symbol, modules_dump, sizeof(modules_dump)), -1, "i:%d testUtilModulesDump == -1\n", i);
+ ret = testUtilZXingCPP(i, symbol, data[i].data, length, modules_dump, cmp_buf, sizeof(cmp_buf), &cmp_len);
+ assert_zero(ret, "i:%d %s testUtilZXingCPP ret %d != 0\n", i, testUtilBarcodeName(symbol->symbology), ret);
+
+ ret = testUtilZXingCPPCmp(symbol, cmp_msg, cmp_buf, cmp_len, data[i].data, length, NULL /*primary*/, escaped, &ret_len);
+ assert_zero(ret, "i:%d %s testUtilZXingCPPCmp %d != 0 %s\n actual: %.*s\nexpected: %.*s\n",
+ i, testUtilBarcodeName(symbol->symbology), ret, cmp_msg, cmp_len, cmp_buf, ret_len, escaped);
+ }
+ }
ZBarcode_Delete(symbol);
}
@@ -218,7 +255,7 @@ static void test_input(const testCtx *const p_ctx) {
/* 28*/ { UNICODE_MODE, 0, -1, "123", -1, 0, 0, "11 EF FF 00 00 00 00 00 00", 1, "N3 (ASCII)" },
/* 29*/ { UNICODE_MODE, 0, -1, "12345", -1, 0, 0, "11 EC 2D FF 80 00 00 00 00", 1, "N5 (ASCII)" },
/* 30*/ { UNICODE_MODE, 0, -1, "Aa%$Bb9", -1, 0, 0, "22 A4 FA 18 3E 2E 52 7F 00", 1, "T7 (ASCII)" },
- /* 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 08 04 0C CD EE 44 06 C4", 1, "T20 B64 N4 H(f)1 T1 H(f)1 T1 H(f)1 T2 H(f)9 B35 (GB 18030)" },
+ /* 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)" },
/* 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)" },
/* 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)" },
/* 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)" },
@@ -581,236 +618,107 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010011010000000001"
"11101010011010101111111"
},
- /* 7*/ { UNICODE_MODE, -1, 3, 10, -1, "1234567890ABCDEFGabcdefg,Han Xin Code", -1, 0, 41, 41, "ISO 20830 K.3 Figure K.16 (& K.14) (happens to use same mask pattern 10)",
- "11111110001011000000100000010101101111111"
- "10000000001011110010000000011010100000001"
- "10111110111111111010111011101111101111101"
+ /* 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)",
+ "11111110001011000010101111011110101111111"
+ "10000000011001010100001111000111100000001"
+ "10111110111111111100011010110100101111101"
"10100000101001001001001001001001100000101"
- "10101110000100100101010010010111001110101"
- "10101110010111110111111011101100101110101"
- "10101110101111001001011101110011001110101"
- "00000000011001100100100100100100100000000"
- "00011110111111111111111001101111110000000"
- "10110011011100110010001001100000001001001"
- "11001100100100100100100100100100100100100"
- "11111111001110101101011011110011011110110"
- "10100001001001000001100001010010001001001"
- "10100100100100100100100101100100001110011"
- "10011111100010110000001111111111101000001"
- "10110000001001001001001001001001001001001"
- "10101011011110000011001101111001100100100"
- "11111111000110010101111011111111111111111"
- "11001001001001000110011001110111100000010"
- "10111110100100100100100110001110011011000"
- "11111111111111111111111111111111111111101"
- "00000000000000000000101001001001001011000"
- "01110110101001001010101000010110100100100"
- "11111111101110010010100011111111111111111"
- "01001001001001001100110001101111011101011"
- "00101111100100100100100100001101001101110"
- "11111111111111111110111111111111111001111"
- "10010110100000101110111010011001001001001"
- "00101001101100100010100100100100100100100"
- "11111111111110110000111000110000110000101"
- "00000001001001001000101011011100000100101"
- "00100100100100100100100100100100101011111"
- "00000001100101110100111011100010101111000"
- "00000000110001001000101001001111000000000"
- "11111110001011100100100100100100101110101"
+ "10101110000100100101010010010000001110101"
+ "10101110000000011111110010111100101110101"
+ "10101110101101001001010111010001001110101"
+ "00000000001110100100100100100100100000000"
+ "00011110111111111111111001101110110000000"
+ "11101011010010011111010011010111001001001"
+ "10100010011010100100100100100100100100100"
+ "11111111001110100110010100010101100011110"
+ "11000110001001000000000101011110001001001"
+ "10100100100100100100100101011011001011001"
+ "11001001111110000011111111111111000000110"
+ "10011011001001001001001001001001001001000"
+ "11010110001100011000111001001100100100100"
+ "11111111000111100011010111111111111111111"
+ "11001001001001001001001010101101000010101"
+ "10001001100100100100100110100110011011100"
+ "11111111111111111111101111111111111111101"
+ "00000000000000000000101001001001001011100"
+ "00110111101100111010110101100110100100100"
+ "11111100100000010100111111111111111111111"
+ "01001001001001010000110000101010110001100"
+ "11001100100100100100100100001010010010101"
+ "11111111111111111110111111111111111110010"
+ "01110000110011010110111011011001001001001"
+ "00101010010001001110100100100100100100100"
+ "11111111111100011100101100000110110100100"
+ "01101001001001001000101010101111100101101"
+ "00100100100100100100100100100100010000101"
+ "00000001111110010110100101111000101111000"
+ "00000000100001001000101001001010000000000"
+ "11111110010010100100100100100100101110101"
"00000010111111111110111111111111001110101"
- "11111010001001000000111111111011001110101"
- "00001010100101111000101010100100100000101"
- "11101010111111111100101100001111101111101"
+ "11111010001011011010100101111000001110101"
+ "00001010111000001010100010100100100000101"
+ "11101010111111111100101100111111101111101"
"11101010101001001000101001001001000000001"
"11101010100100100100111111111111001111111"
},
- /* 8*/ { UNICODE_MODE, -1, 3, 10, 1 << 8, "1234567890ABCDEFGabcdefg,Han Xin Code", -1, 0, 41, 41, "ISO 20830 K.3 Figure K.12 explicit mask pattern 00",
- "11111110100010001000101001011100101111111"
- "10000000101111010110000100111110000000001"
- "10111110100000000101000100010000001111101"
- "10100000100000000000000000000000100000101"
- "10101110100000000001110110110011001110101"
- "10101110001000001000000100010011001110101"
- "10101110000110000000010100111010101110101"
- "00000000011101000000000000000000000000000"
- "00011110100000000000000110010000000000000"
- "11111010010101111011000000101001000000000"
- "11101000000000000000000000000000000000000"
- "10000000110001010010100100001100100001001"
- "11101000000000001000101000011011000000000"
- "10000000000000000000000001000000101010111"
- "11100000011101001111110000000000010111110"
- "11111001000000000000000000000000000000000"
- "10001111111010100111101001011101000000000"
- "10000000111001101010000100000000000000000"
- "10000000000000001111010000111110101001011"
- "10011010000000000000000010101010111111100"
- "11111111111111111111100000000000000000001"
- "00000000000000000000100000000000000010000"
- "01010010001101101110101100110010000000000"
- "00000000010001101100111100000000000000000"
- "00000000000000000100111000100110010100010"
- "00001011000000000000100000101001101001010"
- "00000000000000000000100000000000000110000"
- "11011111101001100110110011010000000000000"
- "00001101001000000110100000000000000000000"
- "00000000000001001110100111001111001111010"
- "01001000000000000000100010010101001101100"
- "00000000000000000000100000000000001111011"
- "00000000011010001010100100011101101111000"
- "00000000011000000000100000000110000000000"
- "11111110101111000000100000000000001110101"
- "00000010000000000000100000000000001110101"
- "11111010000000001000110110110010101110101"
- "00001010100001011100101110000000100000101"
- "11101010000000000010110011110000101111101"
- "11101010000000000000100000000000100000001"
- "11101010100000000000111111111111101111111"
- },
- /* 9*/ { UNICODE_MODE, -1, 3, 10, 2 << 8, "1234567890ABCDEFGabcdefg,Han Xin Code", -1, 0, 41, 41, "ISO 20830 K.3 Figure K.13 explicit mask pattern 01",
- "11111110001000100010100011110110001111111"
- "10000000011010000010000001101011000000001"
- "10111110101010101111101110111010001111101"
- "10100000010101010101010101010101000000101"
- "10101110001010101011011100011001001110101"
- "10101110111101011101010001000110001110101"
- "10101110001100101010111110010000101110101"
- "00000000001000010101010101010101000000000"
- "00011110101010101010101100111010111000000"
- "10101111000000101110010101111100010101010"
- "11000010101010101010101010101010101010101"
- "11010101100100000111110001011001110100011"
- "11000010101010100010000010110001101010101"
- "11010101010101010101010100010101111111101"
- "11001010110111100101011010101010111101011"
- "10101100010101010101010101010101010101010"
- "10100101010000001101000011110111101010101"
- "11010101101100111111010001010101010101010"
- "10101010101010100101111010010100000011110"
- "11001111010101010101010111111111101010100"
- "11111111111111111111101010101010101010101"
- "00000000000000000000110101010101010111000"
- "11111000100111000100100110011000101010101"
- "01010101000100111000101001010101010101010"
- "10101010101010101110110010001100111110111"
- "01011110010101010100110101111100111100000"
- "10101010101010101010101010101010101100101"
- "10001010111100110010100110000101010101010"
- "10100111100010101100101010101010101010101"
- "01010101010100011010110010011010011010000"
- "11100010101010101010101000111111100111001"
- "01010101010101010100110101010101011010001"
- "00000011110000100000101110110111101111000"
- "00000000001101010100110101010011000000000"
- "11111110100101101010101010101010001110101"
- "00000010010101010100110101010101101110101"
- "11111010001010100010111100011000001110101"
- "00001010010100001000111011010101000000101"
- "11101010001010101000111001011010101111101"
- "11101010010101010100110101010101000000001"
- "11101010001010101010111111111111001111111"
- },
- /* 10*/ { UNICODE_MODE, -1, 3, 10, 4 << 8, "1234567890ABCDEFGabcdefg,Han Xin Code", -1, 0, 41, 41, "ISO 20830 K.3 Figure K.15 explicit mask pattern 11",
- "11111110101111100100100100110001001111111"
- "10000000101000010000000011111001100000001"
- "10111110100000000101000100010000101111101"
- "10100000011000111000111000111000000000101"
- "10101110111000000111001101110011001110101"
- "10101110101111001111000011010100101110101"
- "10101110111111000111101100011101001110101"
- "00000000011010000111000111000111100000000"
- "00011110100111000000111110010111001000000"
- "11100000001101000011111000010001111000111"
- "11110010011111000111011000111000000111000"
- "11000101011110010101100011001011100110001"
- "10101101101110110000010001011100000111111"
- "11000111101101000111000110000111101101111"
- "11110000001111101000110111000000101111001"
- "11101001010010011000111000111000111000111"
- "10011111101000111000101110011010011000111"
- "11001111110100000101000011000111000111000"
- "11001111001101100001101000000110010000011"
- "11011101001101101101000101101101111000100"
- "11111111111111111111100111000111000111001"
- "00000000000000000000111000111000111010100"
- "11001000110111111100110011110101000111000"
- "11000101010100000000110011000111000111000"
- "01001101000101101000110110011110101100101"
- "11000110000111101100101101101110101110010"
- "10010010011000010010110010100111000001000"
- "11001111110001110100100001001000111000111"
- "10011101010000010100110010011111000111000"
- "11000111100110000010101010100000001000010"
- "00001111100111001100101111111011110101011"
- "11000111100111001100101101101101001000011"
- "00000010001010111000110110001111101111000"
- "00000000101000111010110010010100000000000"
- "11111110011111111010110010010010101110101"
- "00000010101111000100101101101101101110101"
- "11111010001111001100111011011111101110101"
- "00001010001110011010100011101101000000101"
- "11101010110010111010100001100010101111101"
- "11101010110010111000110010010010100000001"
- "11101010010010111000111111111111101111111"
- },
- /* 11*/ { 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)",
+ /* 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)",
"1111111001111111111011100100110101101010101100101111111"
"1000000000000000001100011000011001000010101111100000001"
- "1011111011110010101110010110100000111010101101101111101"
- "1010000001010100001101011100001101100100010100000000101"
- "1010111000011011001111001000010010110010101010001110101"
- "1010111011010101001101010100001010011001000110001110101"
+ "1011111010001111001111010100100000101010011010101111101"
+ "1010000001001001001110010011010101000110100011000000101"
+ "1010111001111110101100000100101101110010101010001110101"
+ "1010111011010101001101010110011010011000010110001110101"
"1010111001101001001001110010001001100100001001001110101"
- "0000000011100111101101111010001010001100110011000000000"
- "0010010101010100001100111100101010101111010001101000000"
- "1111111011101110101000110010100010000101010101010101010"
- "1010100111011011001101110110100101100011101000111110110"
- "0011100111010001101001111011100001001111110010000011001"
- "0011000100100010101011000001101101010000001010011010000"
- "1100111101010101001101010101010100010100001110110101000"
- "0000000100111001001010101100101100000001011111001110100"
- "1101000010010001001101110001010101101100101110001110111"
- "0101010101011100001110010001111110101010101010101010101"
- "0001011000101000101011010011111000010010000011110101100"
- "1001000100000110001111111111111111111000011101001110001"
- "0010110011110110100000000000000000001101011101001100000"
- "1111111100000100100000111011111001001111011001011100101"
- "1101010101010101010101010100111011001110101010100111101"
- "1101010011001001100110000001001000101000001011111110000"
- "1000111001010111001010111111101100101101010000111001101"
- "1110101100000011001001001011001010101010101010101010101"
- "1101001110000100101100101011001100001001110111011001000"
- "1001101010000000001000010010101100001011101001110010101"
- "1101001100101100100011100010110000101101110100110010110"
- "1000001010101010101010101010111101001010101100011001100"
- "1101000101010110010101100101011000101001001000001000001"
- "1010011101101101010001000111011011101011111010101111001"
- "1101101100100000010010000011011001001101010101010101010"
- "1010111000110111100101100011101010001010001001101110011"
- "1100110000001101010011010000001011101011110011010101001"
- "1011101111011001101010110111101100101100110001101100101"
- "1000110111010101010101010101010100001101011110111010101"
+ "0000000011100111101111000100011010001100110001000000000"
+ "0010010101100110101110110010111101110110110010101000000"
+ "1100001011111001001000101011000000110101010101010101010"
+ "1010101001010000001110100110100101100011101000111110110"
+ "0011100111010001101011001101001000001111110000110100011"
+ "1000001010111011001101011100010111110101000110100001100"
+ "1110111101010101001101010101010101101010110000001101000"
+ "0000000100111001001010101100101100000001011100000000101"
+ "1001100010010111001110110101110011010001100000110100011"
+ "0100010111111001001100010011100001101010101010101010101"
+ "0001000111000001101001110011111000010010000011110101100"
+ "1001000100000110001111111111111111111000110101101001101"
+ "0011010011110101100000000000000000001000110010101000000"
+ "1000000001001000100010111101101011101000010011001011001"
+ "1101010101010101010101010001111110001001011010100111101"
+ "1101010011001001100110000001010101001011100000101110010"
+ "1000111001010110001110110011010101001100101101001101110"
+ "1001100001001010001100110100101010101010101010101010101"
+ "1011100101000000001100101011001100001001110111011001000"
+ "1001100100010000110001011011101100001010011001101011000"
+ "1011000101001000001100010100001101101100100100110011111"
+ "1100101010101010101010101010111001101101001000111001100"
+ "1101000111010110010101100101011000001110011100100011111"
+ "1101011101101100001011110011011010101110101001100110011"
+ "1000001110000100100001001110000011001101010101010101010"
+ "1010100000110010100111100011110010001010001001101110011"
+ "1100110001011100011110010000101011101011110110011001000"
+ "1101110110101010101111111101110010001110011100001010110"
+ "1101110011010101010101010101010101001000101101001010101"
"1111111111111111111110001011001010101111111111111111111"
"0000000000000000001110000010010000000000000000000000001"
- "0100011110001011001010000111010001001101001001010010101"
- "0101011111000100101000110110001100101111110100110101001"
- "0100011010101010101010100110110101100111011001011000101"
- "1000110011110001101000011011111101100010100001110000101"
- "1111001110101101101000100011011010001010011000010000001"
- "0001110000001011001100000011111101010101010101010101001"
- "1010011101001101001101011101000010010100010000001110101"
- "1101100101011001101001000100010000001101111001000111001"
- "0000001010110101101010010110010011001111101011010100100"
- "0000000000000100001001100011100100010101010101100000000"
- "1111111000101010101010101110111100111011011111001110101"
- "0000001000101011001010000100010101001110001111101110101"
- "1111101000100001101101000001100001001011101001001110101"
- "0000101001000100101010110010010101010110011001000000101"
- "1110101010111000101011111101011101111100001110101111101"
- "1110101011010101001101010101010101000000001010000000001"
- "1110101011010001001111111111111111101000001110001111111"
+ "0100100111110100001111000111010001001111011011101011001"
+ "1111100101001100001111011010110010111100110101000010001"
+ "0110101010101010101010100100001110001110000100111000101"
+ "1000110011110001101000011011111101100000001011100000001"
+ "1111001110101101101110110010100100100101000100100101001"
+ "0100110001110100001100111110110101010101010101010101001"
+ "1000101110011101001100100000000010010100010000001110101"
+ "1101100101011000001111000111010100001101111001100110001"
+ "0000001010011010001001000100101011101101010010010100100"
+ "0000000000101111001000111110000110000101010101100000000"
+ "1111111000101010101010101101100101111101000111001110101"
+ "0000001000011011001010000100010101001110001111101110101"
+ "1111101000100001101010011000110011101011101000001110101"
+ "0000101001001110001110110101000101101100010101000000101"
+ "1110101011010110001001010011011111001011110010101111101"
+ "1110101011010101001101010101010101000010110110000000001"
+ "1110101010101101001111111111111111101010010010001111111"
},
- /* 12*/ { 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)",
+ /* 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)",
"11111110000101001111111"
"10000000001000100000001"
"10111110110001001111101"
@@ -835,7 +743,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010111010000000001"
"11101010011010001111111"
},
- /* 13*/ { 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",
+ /* 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",
"11111110100001101111111"
"10000000101011100000001"
"10111110101110001111101"
@@ -860,7 +768,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010101001100000001"
"11101010100100101111111"
},
- /* 14*/ { 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",
+ /* 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",
"11111110001000100011001111111"
"10000000101000001110100000001"
"10111110111111111110101111101"
@@ -891,7 +799,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010101110110000100000001"
"11101010000000111111001111111"
},
- /* 15*/ { 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",
+ /* 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",
"11111110100000101010001111111"
"10000000001100001010000000001"
"10111110100000000001001111101"
@@ -922,7 +830,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010000110111001000000001"
"11101010000100111111101111111"
},
- /* 16*/ { 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",
+ /* 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",
"111111100000101101011111111111111111111001001110010100100010001111111"
"100000001100110100000000000000000010111100110000010001110101000000001"
"101111100111100011100101000110011011011110011110101101001000101111101"
@@ -993,7 +901,7 @@ static void test_encode(const testCtx *const p_ctx) {
"111010100100111101001001010101011000001101010101010101010101100000001"
"111010100010101001111111111111111010101010101010100111111111001111111"
},
- /* 17*/ { 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",
+ /* 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",
"11111110111111111111100010101000011101101011111111111111111110101100101110110110101100011000101111111"
"10000000100000000000100101011001001001000000000000000000000011000001111101100010001100010100100000001"
"10111110110100010100111000101101010111011101101110011000011010100101110001010110001001010010101111101"
@@ -1096,7 +1004,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010110101010100110101010101010101000001010101010101010011010101010101010100000101010101100000001"
"11101010101010101010111111111111111111101010101010101010101011111111111111111110101010101010101111111"
},
- /* 18*/ { 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",
+ /* 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",
"1111111000001010101011111111111111111000011101101011001011111111111111111010111011011001101011111111111111111100111110101001101010010010101111111"
"1000000001000001100000000000000000001111011000100111000000000000000000001101101011101010000000000000000000001111010010101000100011101101000000001"
"1011111001100110000110100101110001001101100010010100100110110000011000101000000110000011100000011011000001001101000000001001100111010111101111101"
@@ -1243,7 +1151,7 @@ static void test_encode(const testCtx *const p_ctx) {
"1110101000010110101111100111011100000010111011110111001101000101010111000001011011001010101011010000000110000011001001000011001101010101000000001"
"1110101010101010101111111111111111101010101010101010101111111111111111101010101010101010101111111111111111101010101010101010101111111111001111111"
},
- /* 19*/ { 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",
+ /* 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",
"111111100111111111100010101000011101011111111111111111000111101110100101111111111111111111100101100001010111111111111111101100011011101001011111111111111110100111001010010101111010101111111"
"100000001000000000111000010110101000000000000000000011110111100101100000000000000000001000111110110011000000000000000000110001110111000100000000000000000010001110000000010001110110100000001"
"101111100010010100101110011110110011111011110000000011110101010100001011100010110000001010100001111001101000000101101000110110001100001101001011001001110011110001101000100110111010001111101"
@@ -1434,7 +1342,7 @@ static void test_encode(const testCtx *const p_ctx) {
"111010101011011100110101010010111000001100010010111011010101010101010001010101010101001101010101010101000101010101010100110101010101010100010101010101010011010101010101010001010101100000001"
"111010101010101010111111111111111101001010101010101011111111111111110100101010101010101111111111111111010010101010101010111111111111111101001010101010101011111111111111110100101010001111111"
},
- /* 20*/ { 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",
+ /* 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",
"1111111000010101011111111111111110001011011110010101111111001111111"
"1000000010000100000000000000000010100011101001010001101110000000001"
"1011111001100100110100001101111011111100101010000111111111101111101"
@@ -1503,7 +1411,7 @@ static void test_encode(const testCtx *const p_ctx) {
"1110101001101001000100110010101000000101000110010110110110100000001"
"1110101000010001111111111111111010010111110110110111111111001111111"
},
- /* 21*/ { DATA_MODE, -1, -1, -1, ZINT_FULL_MULTIBYTE, "é", -1, 0, 23, 23, "Mask automatic (01)",
+ /* 18*/ { DATA_MODE, -1, -1, -1, ZINT_FULL_MULTIBYTE, "é", -1, 0, 23, 23, "Mask automatic (01)",
"11111110100010101111111"
"10000000001010000000001"
"10111110111010001111101"
@@ -1528,7 +1436,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010001001000000001"
"11101010101010101111111"
},
- /* 22*/ { DATA_MODE, -1, -1, -1, ZINT_FULL_MULTIBYTE | (1 << 8), "é", -1, 0, 23, 23, "Mask 00",
+ /* 19*/ { DATA_MODE, -1, -1, -1, ZINT_FULL_MULTIBYTE | (1 << 8), "é", -1, 0, 23, 23, "Mask 00",
"11111110001000001111111"
"10000000111111000000001"
"10111110110000001111101"
@@ -1553,7 +1461,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010011100100000001"
"11101010000000001111111"
},
- /* 23*/ { DATA_MODE, -1, -1, -1, ZINT_FULL_MULTIBYTE | (4 << 8), "é", -1, 0, 23, 23, "Mask 11",
+ /* 20*/ { DATA_MODE, -1, -1, -1, ZINT_FULL_MULTIBYTE | (4 << 8), "é", -1, 0, 23, 23, "Mask 11",
"11111110000101101111111"
"10000000111000100000001"
"10111110110000101111101"
@@ -1578,7 +1486,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010100110100000001"
"11101010111010001111111"
},
- /* 24*/ { DATA_MODE, -1, -1, -1, ZINT_FULL_MULTIBYTE | ((4 + 1) << 8), "é", -1, 0, 23, 23, "Mask > 11 ignored",
+ /* 21*/ { DATA_MODE, -1, -1, -1, ZINT_FULL_MULTIBYTE | ((4 + 1) << 8), "é", -1, 0, 23, 23, "Mask > 11 ignored",
"11111110100010101111111"
"10000000001010000000001"
"10111110111010001111101"
@@ -1603,7 +1511,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010001001000000001"
"11101010101010101111111"
},
- /* 25*/ { 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)",
+ /* 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)",
"11111110011010101111111"
"10000000010101100000001"
"10111110001010001111101"
@@ -1628,7 +1536,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010110101000000001"
"11101010101010001111111"
},
- /* 26*/ { UNICODE_MODE, 3, -1, -1, -1, "price:£20.00", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 3 Example 2 same",
+ /* 23*/ { UNICODE_MODE, 3, -1, -1, -1, "price:£20.00", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 3 Example 2 same",
"11111110011010101111111"
"10000000010100100000001"
"10111110010010001111101"
@@ -1653,7 +1561,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010110100000000001"
"11101010101010001111111"
},
- /* 27*/ { 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)",
+ /* 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)",
"1111111011101010001111111"
"1000000001110000000000001"
"1011111011111110001111101"
@@ -1680,7 +1588,7 @@ static void test_encode(const testCtx *const p_ctx) {
"1110101001101100000000001"
"1110101000001010101111111"
},
- /* 28*/ { 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",
+ /* 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",
"111111100110101010001111111"
"100000000101110001100000001"
"101111100010101110101111101"
@@ -1709,7 +1617,7 @@ static void test_encode(const testCtx *const p_ctx) {
"111010101101010011000000001"
"111010100010001010001111111"
},
- /* 29*/ { 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??",
+ /* 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??",
"1111111011101010101001001111111"
"1000000010001000010011100000001"
"1011111011011100100101101111101"
@@ -1742,7 +1650,7 @@ static void test_encode(const testCtx *const p_ctx) {
"1110101011111011001010100000001"
"1110101001101011111111101111111"
},
- /* 30*/ { 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",
+ /* 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",
"11111110011010101111111"
"10000000010111100000001"
"10111110010110001111101"
@@ -1767,7 +1675,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010110000000000001"
"11101010101010001111111"
},
- /* 31*/ { UNICODE_MODE, 6, 2, -1, -1, "Lietuvą", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 6 Example 1 same",
+ /* 28*/ { UNICODE_MODE, 6, 2, -1, -1, "Lietuvą", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 6 Example 1 same",
"11111110011010101111111"
"10000000010101100000001"
"10111110001010001111101"
@@ -1792,7 +1700,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010110101000000001"
"11101010101010001111111"
},
- /* 32*/ { 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",
+ /* 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",
"11111110011010101111111"
"10000000010101100000001"
"10111110001010001111101"
@@ -1817,7 +1725,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010110101000000001"
"11101010101010001111111"
},
- /* 33*/ { UNICODE_MODE, 7, 2, -1, -1, "Монголулс", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 7 Example 2 same",
+ /* 30*/ { UNICODE_MODE, 7, 2, -1, -1, "Монголулс", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 7 Example 2 same",
"11111110011010101111111"
"10000000010101100000001"
"10111110001010001111101"
@@ -1842,7 +1750,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010111101000000001"
"11101010101010001111111"
},
- /* 34*/ { 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)",
+ /* 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)",
"11111110111101101111111"
"10000000100101000000001"
"10111110000100101111101"
@@ -1867,7 +1775,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010010100100000001"
"11101010111010101111111"
},
- /* 35*/ { UNICODE_MODE, 8, 2, -1, 3 << 8, "المنشأ: المملكة العربية السعودية", -1, 0, 29, 29, "AIM ITS/04-023:2022 ECI 8 Example 2 **NOT SAME** example corrupt??",
+ /* 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??",
"11111110011000101001101111111"
"10000000100000000011100000001"
"10111110010110110011101111101"
@@ -1898,7 +1806,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010100000110001100000001"
"11101010100100111111001111111"
},
- /* 36*/ { 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",
+ /* 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",
"11111110011010001111111"
"10000000110101100000001"
"10111110001110101111101"
@@ -1923,7 +1831,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010110010100000001"
"11101010001010001111111"
},
- /* 37*/ { UNICODE_MODE, 10, 2, -1, -1, "דרכון", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 10 Example 1 same",
+ /* 34*/ { UNICODE_MODE, 10, 2, -1, -1, "דרכון", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 10 Example 1 same",
"11111110011010101111111"
"10000000010101100000001"
"10111110001010001111101"
@@ -1948,7 +1856,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010110101000000001"
"11101010101010001111111"
},
- /* 38*/ { 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",
+ /* 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",
"111111100110010010101111111"
"100000000001000001000000001"
"101111100111111110001111101"
@@ -1977,7 +1885,7 @@ static void test_encode(const testCtx *const p_ctx) {
"111010100001001101000000001"
"111010101001111111001111111"
},
- /* 39*/ { 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",
+ /* 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",
"111111100110101011001111111"
"100000000110110010100000001"
"101111100000100000101111101"
@@ -2006,7 +1914,7 @@ static void test_encode(const testCtx *const p_ctx) {
"111010101000101000000000001"
"111010100111001010001111111"
},
- /* 40*/ { 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",
+ /* 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",
"111111100110101011001111111"
"100000000111001001100000001"
"101111100010101101101111101"
@@ -2035,7 +1943,7 @@ static void test_encode(const testCtx *const p_ctx) {
"111010101101011000000000001"
"111010100010101010001111111"
},
- /* 41*/ { 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)",
+ /* 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)",
"11111110011010101111111"
"10000000010100100000001"
"10111110011100001111101"
@@ -2060,7 +1968,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010111110000000001"
"11101010101010001111111"
},
- /* 42*/ { 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",
+ /* 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",
"11111110011010101111111"
"10000000010101100000001"
"10111110001010001111101"
@@ -2085,7 +1993,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010110101000000001"
"11101010101010001111111"
},
- /* 43*/ { UNICODE_MODE, 15, 2, -1, -1, "uzņēmums", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 15 Example 1 same",
+ /* 40*/ { UNICODE_MODE, 15, 2, -1, -1, "uzņēmums", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 15 Example 1 same",
"11111110011010101111111"
"10000000010101100000001"
"10111110001010001111101"
@@ -2110,7 +2018,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010110101000000001"
"11101010101010001111111"
},
- /* 44*/ { 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)",
+ /* 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)",
"11111110011001001111111"
"10000000000000000000001"
"10111110011111101111101"
@@ -2135,7 +2043,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010001001000000001"
"11101010000100001111111"
},
- /* 45*/ { 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)",
+ /* 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)",
"11111110011010101111111"
"10000000010011100000001"
"10111110000110001111101"
@@ -2160,7 +2068,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010111100000000001"
"11101010101010001111111"
},
- /* 46*/ { 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",
+ /* 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",
"1111111001000000101111111"
"1000000011100111000000001"
"1011111010111110001111101"
@@ -2187,7 +2095,7 @@ static void test_encode(const testCtx *const p_ctx) {
"1110101001010000100000001"
"1110101011100000001111111"
},
- /* 47*/ { 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",
+ /* 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",
"11111110011010101111111"
"10000000010000100000001"
"10111110001010001111101"
@@ -2212,7 +2120,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010101110000000001"
"11101010101010001111111"
},
- /* 48*/ { 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",
+ /* 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",
"11111110111010001111111"
"10000000110000000000001"
"10111110100100101111101"
@@ -2237,7 +2145,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010010101100000001"
"11101010001010101111111"
},
- /* 49*/ { 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",
+ /* 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",
"1111111001000000101111111"
"1000000011000010000000001"
"1011111010111101001111101"
@@ -2264,7 +2172,7 @@ static void test_encode(const testCtx *const p_ctx) {
"1110101001011010100000001"
"1110101010000000001111111"
},
- /* 50*/ { UNICODE_MODE, 22, 2, -1, -1, "Россия", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 22 Example 1 same",
+ /* 47*/ { UNICODE_MODE, 22, 2, -1, -1, "Россия", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 22 Example 1 same",
"11111110011010101111111"
"10000000010001100000001"
"10111110001010001111101"
@@ -2289,7 +2197,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010110101000000001"
"11101010101010001111111"
},
- /* 51*/ { 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)",
+ /* 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)",
"11111110111101101111111"
"10000000100011000000001"
"10111110000000101111101"
@@ -2314,7 +2222,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010010010100000001"
"11101010111010101111111"
},
- /* 52*/ { 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)",
+ /* 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)",
"11111110111101101111111"
"10000000100011000000001"
"10111110000000101111101"
@@ -2339,7 +2247,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010011010100000001"
"11101010111010101111111"
},
- /* 53*/ { UNICODE_MODE, 24, -1, -1, -1, "جواز السفر", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 24 Example 1 same",
+ /* 50*/ { UNICODE_MODE, 24, -1, -1, -1, "جواز السفر", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 24 Example 1 same",
"11111110011010101111111"
"10000000010011100000001"
"10111110001110001111101"
@@ -2364,7 +2272,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010111011000000001"
"11101010101010001111111"
},
- /* 54*/ { UNICODE_MODE, 24, 2, -1, 4 << 8, "المنشأ: المملكة العربية السعودية", -1, 0, 29, 29, "AIM ITS/04-023:2022 ECI 24 Example 2 **NOT SAME** example corrupt??",
+ /* 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??",
"11111110111100101100001111111"
"10000000000110001000100000001"
"10111110001001001000101111101"
@@ -2395,7 +2303,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010111110110010000000001"
"11101010011000111111101111111"
},
- /* 55*/ { UNICODE_MODE, 25, 2, -1, -1, "条码", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 25 Example 1 same",
+ /* 52*/ { UNICODE_MODE, 25, 2, -1, -1, "条码", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 25 Example 1 same",
"11111110011010101111111"
"10000000010001100000001"
"10111110001010001111101"
@@ -2420,7 +2328,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010110101000000001"
"11101010101010001111111"
},
- /* 56*/ { 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)",
+ /* 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)",
"11111110011001001111111"
"10000000000001000000001"
"10111110011011101111101"
@@ -2445,7 +2353,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010001111000000001"
"11101010000100001111111"
},
- /* 57*/ { UNICODE_MODE, 25, 2, -1, -1, "바코드", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 25 Example 3 same",
+ /* 54*/ { UNICODE_MODE, 25, 2, -1, -1, "바코드", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 25 Example 3 same",
"11111110111101101111111"
"10000000100011000000001"
"10111110000000101111101"
@@ -2470,7 +2378,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010011010100000001"
"11101010111010101111111"
},
- /* 58*/ { 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",
+ /* 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",
"11111110111101101111111"
"10000000100011000000001"
"10111110000000101111101"
@@ -2495,7 +2403,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010011010100000001"
"11101010111010101111111"
},
- /* 59*/ { 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)",
+ /* 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)",
"1111111001110110001111111"
"1000000011011011100000001"
"1011111010000100101111101"
@@ -2522,7 +2430,7 @@ static void test_encode(const testCtx *const p_ctx) {
"1110101011110011100000001"
"1110101001010110001111111"
},
- /* 60*/ { UNICODE_MODE, 26, 2, -1, -1, "바코드", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 26 Example 3 same",
+ /* 57*/ { UNICODE_MODE, 26, 2, -1, -1, "바코드", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 26 Example 3 same",
"11111110111101101111111"
"10000000100011000000001"
"10111110000000101111101"
@@ -2547,7 +2455,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010011010100000001"
"11101010111010101111111"
},
- /* 61*/ { 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)",
+ /* 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)",
"11111110011001001111111"
"10000000000000000000001"
"10111110011111101111101"
@@ -2572,7 +2480,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010001001000000001"
"11101010000100001111111"
},
- /* 62*/ { UNICODE_MODE, 28, 2, -1, -1, "條碼", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 28 Example 1 same",
+ /* 59*/ { UNICODE_MODE, 28, 2, -1, -1, "條碼", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 28 Example 1 same",
"11111110011010101111111"
"10000000010001100000001"
"10111110001010001111101"
@@ -2597,7 +2505,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010110101000000001"
"11101010101010001111111"
},
- /* 63*/ { UNICODE_MODE, 29, 2, -1, -1, "条码", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 29 Example 1 same",
+ /* 60*/ { UNICODE_MODE, 29, 2, -1, -1, "条码", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 29 Example 1 same",
"11111110011010101111111"
"10000000010001100000001"
"10111110001010001111101"
@@ -2622,7 +2530,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010110101000000001"
"11101010101010001111111"
},
- /* 64*/ { UNICODE_MODE, 29, 2, -1, -1, "北京", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 29 Example 2 same",
+ /* 61*/ { UNICODE_MODE, 29, 2, -1, -1, "北京", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 29 Example 2 same",
"11111110011010101111111"
"10000000010001100000001"
"10111110001010001111101"
@@ -2647,7 +2555,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010110101000000001"
"11101010101010001111111"
},
- /* 65*/ { 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",
+ /* 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",
"11111110011010101111111"
"10000000010001100000001"
"10111110001010001111101"
@@ -2672,7 +2580,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010110101000000001"
"11101010101010001111111"
},
- /* 66*/ { 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)",
+ /* 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)",
"11111110111101101111111"
"10000000100011000000001"
"10111110000000101111101"
@@ -2697,7 +2605,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010011010100000001"
"11101010111010101111111"
},
- /* 67*/ { 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",
+ /* 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",
"11111110011010101111111"
"10000000010001100000001"
"10111110001010001111101"
@@ -2722,7 +2630,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010110101000000001"
"11101010101010001111111"
},
- /* 68*/ { 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",
+ /* 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",
"11111110011010101111111"
"10000000010001100000001"
"10111110001010001111101"
@@ -2747,7 +2655,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010110101000000001"
"11101010101010001111111"
},
- /* 69*/ { 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)",
+ /* 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)",
"11111110011010101111111"
"10000000010001100000001"
"10111110001010001111101"
@@ -2772,7 +2680,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010110101000000001"
"11101010101010001111111"
},
- /* 70*/ { 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)",
+ /* 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)",
"11111110111101101111111"
"10000000100011000000001"
"10111110000000101111101"
@@ -2797,7 +2705,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010011010100000001"
"11101010111010101111111"
},
- /* 71*/ { 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)",
+ /* 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)",
"11111110011001001111111"
"10000000000000000000001"
"10111110011111101111101"
@@ -2822,7 +2730,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010001001000000001"
"11101010000100001111111"
},
- /* 72*/ { 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)",
+ /* 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)",
"11111110011010101111111"
"10000000011101100000001"
"10111110001010001111101"
@@ -2847,7 +2755,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010110101000000001"
"11101010101010001111111"
},
- /* 73*/ { 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)",
+ /* 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)",
"11111110111101101111111"
"10000000101111000000001"
"10111110000000101111101"
@@ -2872,7 +2780,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010011010100000001"
"11101010111010101111111"
},
- /* 74*/ { 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)",
+ /* 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)",
"11111110011001001111111"
"10000000001100000000001"
"10111110011111101111101"
@@ -2897,7 +2805,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010001001000000001"
"11101010000100001111111"
},
- /* 75*/ { 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)",
+ /* 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)",
"1111111011101011001111111"
"1000000001011100000000001"
"1011111011000010001111101"
@@ -2924,7 +2832,7 @@ static void test_encode(const testCtx *const p_ctx) {
"1110101001100100000000001"
"1110101001001010101111111"
},
- /* 76*/ { UNICODE_MODE, 32, 2, -1, -1, "バーコード", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 32 Example 5 same",
+ /* 73*/ { UNICODE_MODE, 32, 2, -1, -1, "バーコード", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 32 Example 5 same",
"11111110111101101111111"
"10000000101100000000001"
"10111110000000101111101"
@@ -2949,7 +2857,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010000101100000001"
"11101010111010101111111"
},
- /* 77*/ { UNICODE_MODE, 32, 2, -1, -1, "바코드", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 32 Example 6 same",
+ /* 74*/ { UNICODE_MODE, 32, 2, -1, -1, "바코드", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 32 Example 6 same",
"11111110111101101111111"
"10000000101111000000001"
"10111110000000101111101"
@@ -2974,7 +2882,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010011010100000001"
"11101010111010101111111"
},
- /* 78*/ { 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)",
+ /* 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)",
"11111110111101101111111"
"10000000101111000000001"
"10111110000000101111101"
@@ -2999,7 +2907,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010011010100000001"
"11101010111010101111111"
},
- /* 79*/ { UNICODE_MODE, 33, 2, -1, -1, "バーコード", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 33 Example 2 same",
+ /* 76*/ { UNICODE_MODE, 33, 2, -1, -1, "バーコード", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 33 Example 2 same",
"11111110111101101111111"
"10000000101101000000001"
"10111110000000101111101"
@@ -3024,7 +2932,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010010011100000001"
"11101010111010101111111"
},
- /* 80*/ { 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)",
+ /* 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)",
"11111110011010101111111"
"10000000011101100000001"
"10111110001010001111101"
@@ -3049,7 +2957,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010110101000000001"
"11101010101010001111111"
},
- /* 81*/ { 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)",
+ /* 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)",
"11111110111101101111111"
"10000000101111000000001"
"10111110000000101111101"
@@ -3074,7 +2982,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010011010100000001"
"11101010111010101111111"
},
- /* 82*/ { 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)",
+ /* 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)",
"1111111011101011001111111"
"1000000001010101000000001"
"1011111010001110001111101"
@@ -3101,7 +3009,7 @@ static void test_encode(const testCtx *const p_ctx) {
"1110101001110101000000001"
"1110101000101010101111111"
},
- /* 83*/ { 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)",
+ /* 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)",
"11111110111101101111111"
"10000000101111000000001"
"10111110000010101111101"
@@ -3126,7 +3034,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010011010100000001"
"11101010111010101111111"
},
- /* 84*/ { 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)",
+ /* 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)",
"11111110011010101111111"
"10000000011101100000001"
"10111110001010001111101"
@@ -3151,7 +3059,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010110101000000001"
"11101010101010001111111"
},
- /* 85*/ { UNICODE_MODE, 35, 2, -1, -1, "バーコード", -1, 0, 25, 25, "AIM ITS/04-023:2022 ECI 35 Example 2 same",
+ /* 82*/ { UNICODE_MODE, 35, 2, -1, -1, "バーコード", -1, 0, 25, 25, "AIM ITS/04-023:2022 ECI 35 Example 2 same",
"1111111011101011001111111"
"1000000001110101000000001"
"1011111010100100001111101"
@@ -3178,7 +3086,7 @@ static void test_encode(const testCtx *const p_ctx) {
"1110101000101100000000001"
"1110101000001010101111111"
},
- /* 86*/ { 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)",
+ /* 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)",
"11111110111101101111111"
"10000000101101000000001"
"10111110010000101111101"
@@ -3203,7 +3111,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010011111100000001"
"11101010111010101111111"
},
- /* 87*/ { UNICODE_MODE, 170, 2, -1, -1, "sn:7QPB4MN", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 170 Example 1 same",
+ /* 84*/ { UNICODE_MODE, 170, 2, -1, -1, "sn:7QPB4MN", -1, 0, 23, 23, "AIM ITS/04-023:2022 ECI 170 Example 1 same",
"11111110111100101111111"
"10000000100111000000001"
"10111110000000101111101"
@@ -3228,7 +3136,7 @@ static void test_encode(const testCtx *const p_ctx) {
"11101010000110100000001"
"11101010111010101111111"
},
- /* 88*/ { 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",
+ /* 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",
"11111110011011101111111"
"10000000010110100000001"
"10111110010110001111101"
@@ -3621,6 +3529,51 @@ static void test_encode_segs(const testCtx *const p_ctx) {
testFinish();
}
+/* #300 Andre Maute */
+static void test_fuzz(const testCtx *const p_ctx) {
+ int debug = p_ctx->debug;
+
+ struct item {
+ int symbology;
+ int input_mode;
+ int eci;
+ int option_1;
+ int option_2;
+ int option_3;
+ char *data;
+ int length;
+ int ret;
+ int bwipp_cmp;
+ char *comment;
+ };
+ /* s/\/\*[ 0-9]*\*\//\=printf("\/\*%3d*\/", line(".") - line("'<")): */
+ struct item data[] = {
+ /* 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 */
+ };
+ int data_size = ARRAY_SIZE(data);
+ int i, length, ret;
+ struct zint_symbol *symbol = NULL;
+
+ testStartSymbol("test_fuzz", &symbol);
+
+ for (i = 0; i < data_size; i++) {
+
+ if (testContinue(p_ctx, i)) continue;
+
+ symbol = ZBarcode_Create();
+ assert_nonnull(symbol, "Symbol not created\n");
+
+ 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);
+
+ 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);
+
+ ZBarcode_Delete(symbol);
+ }
+
+ testFinish();
+}
+
#include
For non-Maxicode raster output, the default scale of 1 results in an -X-dimension of 2 pixels. For example for non-Maxicode PNG images a scale -of 5 will increase the X-dimension to 10 pixels. For Maxicode, see For non-MaxiCode raster output, the default scale of 1 results in an +X-dimension of 2 pixels. For example for non-MaxiCode PNG images a scale +of 5 will increase the X-dimension to 10 pixels. For MaxiCode, see 4.9.3 MaxiCode Raster Scaling below.
-Scales for non-Maxicode raster output should be given in increments +
Scales for non-MaxiCode raster output should be given in increments of 0.5, i.e. 0.5, 1, 1.5, 2, 2.5, 3, 3.5, etc., to avoid the X-dimension varying across the symbol due to interpolation. 0.5 increments are also faster to render.
-The minimum scale for non-Maxicode raster output in non-dotty mode is +
The minimum scale for non-MaxiCode raster output in non-dotty mode is 0.5, giving a minimum X-dimension of 1 pixel. For MaxiCode, it is 0.2. The minimum scale for raster output in dotty mode is 1 (see 4.15 Working with Dots). For raster output, text will not be printed for scales less than 1.
The minimum scale for vector output is 0.1, giving a minimum -X-dimension of 0.2 (or for Maxicode EMF output, 4). The maximum scale +X-dimension of 0.2 (or for MaxiCode EMF output, 4). The maximum scale for both raster and vector is 200.
To summarize the more intricate details:
The largest version 24 (144 x 144) can encode 3116 digits, around +2335 alphanumeric characters, or 1555 bytes of data.
When using automatic symbol sizes you can force Zint to use square
symbols (versions 1-24) at the command line by using the option
--square
(API option_3 = DM_SQUARE
).
"$%*+-./:"
+Version M4 can encode up to 35 digits, 21 alphanumerics, 15 bytes or +9 Kanji characters.
Except for version M1, which is always ECC level L, the amount of ECC
codewords can be adjusted using the --secure
option (API
option_1
); however ECC level H is not available for any
@@ -6788,6 +6792,8 @@ while allowing Zint to determine the minimum symbol width.
The largest version R17x139 (32) can encode up to 361 digits, 219 +alphanumerics, 150 bytes, or 92 Kanji characters.
For barcode readers that support it, non-ASCII data density may be
maximized by using the --fullmultibyte
switch or in the API
by setting option_3 = ZINT_FULL_MULTIBYTE
.
zint -b GRIDMATRIX --eci=29 -d "AAT2556 电池充电器
supports the GB 2312 standard set, which includes Hanzi, ASCII and a
small number of ISO/IEC 8859-1 characters. Input should be entered as
UTF-8 with conversion to GB 2312 being carried out automatically by
-Zint. The symbology also supports the ECI mechanism. Support for GS1
+Zint. Up to around 1529 alphanumeric characters or 2751 digits may be
+encoded. The symbology also supports the ECI mechanism. Support for GS1
data has not yet been implemented.
The size of the symbol and the error correction capacity can be
specified. If you specify both of these values then Zint will make a
@@ -7790,6 +7797,9 @@ to the following table.
+The largest version (84) can encode 7827 digits, 4350 ASCII
+characters, up to 2175 Chinese characters, or 3261 bytes, making it the
+most capacious of all the barcodes supported by Zint.
There are four levels of error correction capacity available for Han
Xin Code which can be set by using the --secure
option (API
option_1
) to a value from the following table.
@@ -7895,11 +7905,16 @@ data-tag=": Ultracode Error Correction Values">
this can be initiated through the API by setting
->option_3 = ULTRA_COMPRESSION; symbol
-WARNING: Ultracode data compression is experimental and should not be
-used in a production environment.
-Revision 2 of Ultracode (2021) which swops and inverts the DCCU and
+
With compression, up to 504 digits, 375 alphanumerics or 252 bytes
+can be encoded.
+Revision 2 of Ultracode (2023) which swops and inverts the DCCU and
DCCL tiles may be specified using --vers=2
(API
option_2 = 2
).
+
+WARNING: Revision 2 of Ultracode is currently (December 2023)
+undergoing major modifications, yet to be finalized, and should not be
+used in a production environment.
+