diff --git a/ChangeLog b/ChangeLog
index a0ed1e76..13bc5541 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,4 @@
-Version 2.15.0.9 (dev) not released yet (2025-09-12)
+Version 2.15.0.9 (dev) not released yet (2025-09-16)
====================================================
**Incompatible changes**
@@ -48,7 +48,8 @@ Changes
`BARCODE_EANX_CC` and use in CLI/GUI (`BARCODE_EANX` etc. marked as legacy)
- For EAN/UPC accept space as alternative add-on separator to '+', and accept
GTIN-13 format with & without 2-digit or 5-digit add-on (no separator)
-- GS1PARENS_MODE: allow parentheses in AI data if backslashed and `ESCAPE_MODE`
+- GS1PARENS_MODE: allow parentheses in AI data if backslashed (necessary for
+ opening parentheses, optional for closing ones)
- Prefix all `INTERNAL` funcs/tables with `zint_`, except for those in
"backend/common.h", which are prefixed by `z_` - makes symbol clashes more
unlikely when zint is statically linked (ticket #337, props Ulrich Becker)
@@ -56,6 +57,9 @@ Changes
`GS1SYNTAXENGINE_MODE` (CLI --gs1strict, GUI "GS1 Strict" checkbox)
- GS1_MODE: allow GS1 Digital Link URIs (no validation unless
`GS1SYNTAXENGINE_MODE` set)
+- CLI: --gs1parens, --gs1nocheck and --gs1strict now imply --gs1;
+ --gs1parens no longer requires --esc if AI data includes backslashed
+ parentheses
Bugs
----
diff --git a/backend/CMakeLists.txt b/backend/CMakeLists.txt
index 576c91a0..12cd994b 100644
--- a/backend/CMakeLists.txt
+++ b/backend/CMakeLists.txt
@@ -6,10 +6,15 @@ cmake_minimum_required(VERSION 3.10)
project(zint)
if(ZINT_USE_PNG)
+ cmake_policy(SET CMP0074 NEW) # Allow use of `_ROOT` (Windows)
find_package(PNG)
endif()
if(ZINT_USE_GS1SE)
- find_library(GS1SE gs1encoders)
+ if(WIN32)
+ find_library(GS1SE gs1encoders PATH ${GS1SE_PATH})
+ else()
+ find_library(GS1SE gs1encoders)
+ endif()
endif()
set(zint_COMMON_SRCS common.c eci.c filemem.c general_field.c gs1.c large.c library.c reedsol.c)
@@ -129,6 +134,10 @@ zint_target_include_directories(PUBLIC
$
$
)
+if(WIN32 AND GS1SE)
+ get_filename_component(GS1SE_INC ${GS1SE} DIRECTORY)
+ zint_target_include_directories(PRIVATE ${GS1SE_INC})
+endif()
# Adapted from old (2008) KDE "SetPaths.cmake" to use GNUInstallDirs
set(INSTALL_TARGETS_DEFAULT_ARGS RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
diff --git a/backend_qt/qzint.cpp b/backend_qt/qzint.cpp
index b3375c61..913f2686 100644
--- a/backend_qt/qzint.cpp
+++ b/backend_qt/qzint.cpp
@@ -1362,9 +1362,16 @@ namespace Zint {
arg_bool(cmd, "--fullmultibyte", supportsFullMultibyte() && (option3() & 0xFF) == ZINT_FULL_MULTIBYTE);
if (supportsGS1()) {
- arg_bool(cmd, "--gs1", (inputMode() & 0x07) == GS1_MODE);
- arg_bool(cmd, "--gs1parens", gs1Parens() || (inputMode() & GS1PARENS_MODE));
- arg_bool(cmd, "--gs1nocheck", gs1NoCheck() || (inputMode() & GS1NOCHECK_MODE));
+ bool done_gs1 = false;
+ if (gs1Parens() || (inputMode() & GS1PARENS_MODE)) {
+ arg_bool(cmd, "--gs1parens", (done_gs1 = true));
+ }
+ if (gs1NoCheck() || (inputMode() & GS1NOCHECK_MODE)) {
+ arg_bool(cmd, "--gs1nocheck", (done_gs1 = true));
+ } else if (gs1SyntaxEngine() || (inputMode() & GS1SYNTAXENGINE_MODE)) {
+ arg_bool(cmd, "--gs1strict", (done_gs1 = true));
+ }
+ arg_bool(cmd, "--gs1", (inputMode() & 0x07) == GS1_MODE && !done_gs1);
arg_bool(cmd, "--gssep", gsSep());
}
diff --git a/backend_qt/tests/test_qzint.cpp b/backend_qt/tests/test_qzint.cpp
index 876bfded..fce238cb 100644
--- a/backend_qt/tests/test_qzint.cpp
+++ b/backend_qt/tests/test_qzint.cpp
@@ -288,6 +288,10 @@ private slots:
bc.setGS1NoCheck(gs1NoCheck);
QCOMPARE(bc.gs1NoCheck(), gs1NoCheck);
+ bool gs1SyntaxEngine = true;
+ bc.setGS1SyntaxEngine(gs1SyntaxEngine);
+ QCOMPARE(bc.gs1SyntaxEngine(), gs1SyntaxEngine);
+
bool readerInit = true;
bc.setReaderInit(readerInit);
QCOMPARE(bc.readerInit(), readerInit);
@@ -624,6 +628,7 @@ private slots:
QTest::addColumn("eci");
QTest::addColumn("gs1Parens");
QTest::addColumn("gs1NoCheck");
+ QTest::addColumn("gs1SyntaxEngine");
QTest::addColumn("readerInit");
QTest::addColumn("guardWhitespace");
QTest::addColumn("embedVectorFont");
@@ -652,7 +657,7 @@ private slots:
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
<< true << false << false << false << true << 0 // showText-rotateAngle
- << 0 << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 0 << false << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 63 --binary --compliantheight -d '12345678'"
<< "zint.exe -b 63 --binary --compliantheight -d \"12345678\""
@@ -669,7 +674,7 @@ private slots:
<< "" << "" << QColor(Qt::blue) << QColor(Qt::white) << true // fgStr-cmyk
<< 0 << 0 << 2 << 3 << 0 // borderTypeIndex-fontSetting
<< true << false << false << false << false << 0 // showText-rotateAngle
- << 7 << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 7 << false << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 92 --cmyk --eci=7 -d '12345678Ж0%var%' --dotsize=0.9 --dotty --fg=0000FF --scale=4"
" --secure=1 --structapp='1,2,as\"dfa'\\''sdf' --vwhitesp=3 -w 2"
@@ -685,7 +690,7 @@ private slots:
<< "71,0,40,44" << "0,0,0,0" << QColor(Qt::black) << QColor(Qt::white) << true // fgStr-cmyk
<< 0 << 0 << 2 << 3 << 0 // borderTypeIndex-fontSetting
<< true << false << false << false << false << 0 // showText-rotateAngle
- << 7 << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 7 << false << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 92 --bg=0,0,0,0 --cmyk --eci=7 -d '12345678Ж0%var%' --dotsize=0.9 --dotty --fg=71,0,40,44 --scale=4"
" --secure=1 --structapp='1,2,as\"dfa'\\''sdf' --vwhitesp=3 -w 2"
@@ -701,7 +706,7 @@ private slots:
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 0 << 0 << 0 << 0 << SMALL_TEXT // borderTypeIndex-fontSetting
<< true << false << false << false << true << 0 // showText-rotateAngle
- << 0 << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 0 << false << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 3 --compliantheight -d '12345' --small --vers=2"
<< "zint.exe -b 3 --compliantheight -d \"12345\" --small --vers=2"
@@ -715,7 +720,7 @@ private slots:
<< "" << "" << QColor(Qt::black) << QColor(255, 255, 255, 0) << false // fgStr-cmyk
<< 1 << 2 << 0 << 0 << BOLD_TEXT // borderTypeIndex-fontSetting
<< true << false << true << false << false << 90 // showText-rotateAngle
- << 0 << false << false << false << false << false << WARN_DEFAULT << true // eci-debug
+ << 0 << false << false << false << false << false << false << WARN_DEFAULT << true // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 140 --bind --bold --border=2 -d '453678' --height=19.7 --nobackground --quietzones"
" --rotate=90 --verbose --vers=7"
@@ -731,7 +736,7 @@ private slots:
<< "" << "FFFFFF00" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 1 << 2 << 0 << 0 << BOLD_TEXT // borderTypeIndex-fontSetting
<< true << false << true << false << false << 90 // showText-rotateAngle
- << 0 << false << false << false << false << false << WARN_DEFAULT << true // eci-debug
+ << 0 << false << false << false << false << false << false << WARN_DEFAULT << true // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 140 --bind --bold --border=2 -d '453678' --height=19.7 --nobackground --quietzones"
" --rotate=90 --verbose --vers=7"
@@ -747,7 +752,7 @@ private slots:
<< "" << "12345600" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 1 << 2 << 0 << 0 << BOLD_TEXT // borderTypeIndex-fontSetting
<< true << false << true << false << false << 90 // showText-rotateAngle
- << 0 << false << false << false << false << false << WARN_DEFAULT << true // eci-debug
+ << 0 << false << false << false << false << false << false << WARN_DEFAULT << true // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 140 --bind --bold --border=2 -d '453678' --height=19.7 --nobackground --quietzones"
" --rotate=90 --verbose --vers=7"
@@ -763,7 +768,7 @@ private slots:
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
<< false << false << true << false << true << 0 // showText-rotateAngle
- << 0 << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 0 << false << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 20 -d '1234\\^A56' --extraesc --notext --quietzones"
<< "zint.exe -b 20 -d \"1234\\^A56\" --extraesc --notext --quietzones"
@@ -777,7 +782,7 @@ private slots:
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
<< false << false << true << false << true << 0 // showText-rotateAngle
- << 0 << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 0 << false << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 131 --compliantheight -d '[11]901222[99]ABCDE' --height=71.142 --mode=3 --notext"
" --primary='[01]12345678901231[15]121212' --quietzones --scale=3.5"
@@ -793,7 +798,7 @@ private slots:
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 1 << 1 << 0 << 0 << SMALL_TEXT // borderTypeIndex-fontSetting
<< true << false << false << true << true << 0 // showText-rotateAngle
- << 0 << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 0 << false << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 23 --compliantheight -d '12345678901234567890123456789012'"
" --height=11.7 --heightperrow --noquietzones --rows=4 --separator=2 --small"
@@ -809,7 +814,7 @@ private slots:
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
<< true << false << false << false << true << 0 // showText-rotateAngle
- << 0 << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 0 << false << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 24 --compliantheight -d '12345678901234567890'"
<< "zint.exe -b 24 --compliantheight -d \"12345678901234567890\""
@@ -823,7 +828,7 @@ private slots:
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 2 << 4 << 0 << 0 << 0 // borderTypeIndex-fontSetting
<< true << false << false << false << true << 0 // showText-rotateAngle
- << 0 << false << false << true << false << false << WARN_DEFAULT << false // eci-debug
+ << 0 << false << false << false << true << false << false << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 74 --binary --border=4 --box --cols=5 --compliantheight -d 'T\\n\\xA0t\\\"' --esc --init"
" --rows=2 --scale=3 --separator=3"
@@ -839,7 +844,7 @@ private slots:
<< "" << "" << QColor(0x30, 0x31, 0x32, 0x33) << QColor(0xBF, 0xBE, 0xBD, 0xBC) << false // fgStr-cmyk
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
<< true << false << false << false << true << 0 // showText-rotateAngle
- << 0 << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 0 << false << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 93 --bg=BFBEBDBC -d 'daft' --fg=30313233 --height=9.2 --vers=251"
<< "zint.exe -b 93 --bg=BFBEBDBC -d \"daft\" --fg=30313233 --height=9.2 --vers=251"
@@ -853,12 +858,54 @@ private slots:
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
<< true << true << false << false << true << 0 // showText-rotateAngle
- << 0 << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 0 << false << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 71 -d '[20]12' --gs1 --gssep --square"
<< "zint.exe -b 71 -d \"[20]12\" --gs1 --gssep --square"
<< "" << "" << "" << "";
+ QTest::newRow("BARCODE_DATAMATRIX (GS1Parens + Strict)") << true << 0.0f << ""
+ << BARCODE_DATAMATRIX << GS1_MODE // symbology-inputMode
+ << "[20]12" << "" // text-primary
+ << 0.0f << -1 << 0 << DM_SQUARE << 1.0f << 0.0f << false << 0.7f << 1.0f // height-textGap
+ << 5.0f << 0 << 0 << "" // guardDescent-structAppID
+ << "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
+ << 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
+ << true << true << false << false << true << 0 // showText-rotateAngle
+ << 0 << true << false << true << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
+ << "zint -b 71 -d '[20]12' --gs1parens --gs1strict --gssep --square"
+ << "zint.exe -b 71 -d \"[20]12\" --gs1parens --gs1strict --gssep --square"
+ << "" << "" << "" << "";
+
+ QTest::newRow("BARCODE_DATAMATRIX (GS1Strict)") << true << 0.0f << ""
+ << BARCODE_DATAMATRIX << GS1_MODE // symbology-inputMode
+ << "[20]12" << "" // text-primary
+ << 0.0f << -1 << 0 << DM_SQUARE << 1.0f << 0.0f << false << 0.7f << 1.0f // height-textGap
+ << 5.0f << 0 << 0 << "" // guardDescent-structAppID
+ << "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
+ << 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
+ << true << true << false << false << true << 0 // showText-rotateAngle
+ << 0 << false << false << true << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
+ << "zint -b 71 -d '[20]12' --gs1strict --gssep --square"
+ << "zint.exe -b 71 -d \"[20]12\" --gs1strict --gssep --square"
+ << "" << "" << "" << "";
+
+ QTest::newRow("BARCODE_DATAMATRIX (GS1NoCheck + Strict (ignored))") << true << 0.0f << ""
+ << BARCODE_DATAMATRIX << GS1_MODE // symbology-inputMode
+ << "[20]12" << "" // text-primary
+ << 0.0f << -1 << 0 << DM_SQUARE << 1.0f << 0.0f << false << 0.7f << 1.0f // height-textGap
+ << 5.0f << 0 << 0 << "" // guardDescent-structAppID
+ << "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
+ << 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
+ << true << true << false << false << true << 0 // showText-rotateAngle
+ << 0 << false << true << true << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
+ << "zint -b 71 -d '[20]12' --gs1nocheck --gssep --square"
+ << "zint.exe -b 71 -d \"[20]12\" --gs1nocheck --gssep --square"
+ << "" << "" << "" << "";
+
QTest::newRow("BARCODE_DATAMATRIX") << false << 0.0f << ""
<< BARCODE_DATAMATRIX << (DATA_MODE | ESCAPE_MODE | FAST_MODE) // symbology-inputMode
<< "ABCDEFGH\\x01I" << "" // text-primary
@@ -867,7 +914,7 @@ private slots:
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
<< true << false << false << false << true << 0 // showText-rotateAngle
- << 0 << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 0 << false << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 71 --binary -d 'ABCDEFGH\\x01I' --dmiso144 --esc --fast"
<< "zint.exe -b 71 --binary -d \"ABCDEFGH\\x01I\" --dmiso144 --esc --fast"
@@ -881,7 +928,7 @@ private slots:
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
<< true << false << false << false << true << 0 // showText-rotateAngle
- << 0 << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 0 << false << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 139 --binary --compliantheight -d '[11]901222[99]ABCDE' --height=40.8 --heightperrow"
" --primary='[91]ABCDEFGHIJKL' --rows=2"
@@ -897,12 +944,26 @@ private slots:
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
<< true << false << false << false << true << 0 // showText-rotateAngle
- << 0 << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 0 << false << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 115 --cols=8 -d '[20]01' --dotsize=0.7 --gs1 --mask=0"
<< "zint.exe -b 115 --cols=8 -d \"[20]01\" --dotsize=0.7 --gs1 --mask=0"
<< "" << "" << "" << "";
+ QTest::newRow("BARCODE_DOTCODE (GS1Strict") << false << 1.0f << ""
+ << BARCODE_DOTCODE << (GS1_MODE | GS1SYNTAXENGINE_MODE) // symbology-inputMode
+ << "[20]01" << "" // text-primary
+ << 30.0f << -1 << 8 << ((0 + 1) << 8) << 1.0f << 0.0f << false << 0.7f << 1.0f // height-textGap
+ << 0.0f << 0 << 0 << "" // guardDescent-structAppID
+ << "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
+ << 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
+ << true << false << false << false << true << 0 // showText-rotateAngle
+ << 0 << false << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
+ << "zint -b 115 --cols=8 -d '[20]01' --dotsize=0.7 --gs1strict --mask=0"
+ << "zint.exe -b 115 --cols=8 -d \"[20]01\" --dotsize=0.7 --gs1strict --mask=0"
+ << "" << "" << "" << "";
+
QTest::newRow("BARCODE_DPD") << true << 0.0f << ""
<< BARCODE_DPD << UNICODE_MODE // symbology-inputMode
<< "1234567890123456789012345678" << "" // text-primary
@@ -911,7 +972,7 @@ private slots:
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
<< true << false << false << false << true << 0 // showText-rotateAngle
- << 0 << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 0 << false << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
<< 0.375 << 0 << 600 << 1 << 0 << 0 // xdimdp
<< "zint -b 96 --compliantheight -d '1234567890123456789012345678' --scalexdimdp=0.375,24"
<< "zint.exe -b 96 --compliantheight -d \"1234567890123456789012345678\" --scalexdimdp=0.375,24"
@@ -926,7 +987,7 @@ private slots:
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
<< true << false << false << false << true << 0 // showText-rotateAngle
- << 0 << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 0 << false << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 15 --addongap=8 --compliantheight -d '123456789012+12' --guarddescent=0"
<< "zint.exe -b 15 --addongap=8 --compliantheight -d \"123456789012+12\" --guarddescent=0"
@@ -940,7 +1001,7 @@ private slots:
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
<< true << false << false << false << true << 0 // showText-rotateAngle
- << 0 << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 0 << false << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 13 --addongap=8 --compliantheight -d '123456789012+12' --guarddescent=0"
<< "zint.exe -b 13 --addongap=8 --compliantheight -d \"123456789012+12\" --guarddescent=0"
@@ -954,7 +1015,7 @@ private slots:
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
<< true << false << false << false << true << 0 // showText-rotateAngle
- << 0 << false << false << false << true << true << WARN_DEFAULT << false // eci-debug
+ << 0 << false << false << false << false << true << true << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 15 --addongap=8 --compliantheight -d '123456789012+12' --embedfont --guarddescent=0 --guardwhitespace"
<< "zint.exe -b 15 --addongap=8 --compliantheight -d \"123456789012+12\" --embedfont --guarddescent=0 --guardwhitespace"
@@ -968,7 +1029,7 @@ private slots:
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
<< true << false << false << false << true << 0 // showText-rotateAngle
- << 0 << false << false << false << true << true << WARN_DEFAULT << false // eci-debug
+ << 0 << false << false << false << false << true << true << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 13 --addongap=8 --compliantheight -d '123456789012+12' --embedfont --guarddescent=0 --guardwhitespace"
<< "zint.exe -b 13 --addongap=8 --compliantheight -d \"123456789012+12\" --embedfont --guarddescent=0 --guardwhitespace"
@@ -982,7 +1043,7 @@ private slots:
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
<< true << false << true << false << true << 270 // showText-rotateAngle
- << 0 << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 0 << false << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 142 -d 'Your Data Here!' --quietzones --rotate=270 --scale=0.5 --secure=1 --vers=5"
<< "zint.exe -b 142 -d \"Your Data Here!\" --quietzones --rotate=270 --scale=0.5 --secure=1 --vers=5"
@@ -996,7 +1057,7 @@ private slots:
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
<< true << false << false << false << true << 0 // showText-rotateAngle
- << 29 << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 29 << false << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 116 --eci=29 -d 'éβÿ啊\\e\"'\\''' --esc --mask=0 --secure=2 --vers=5"
<< "zint.exe -b 116 --eci=29 -d \"éβÿ啊\\e\\\"'\" --esc --mask=0 --secure=2 --vers=5"
@@ -1010,7 +1071,7 @@ private slots:
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
<< true << true << false << false << true << 0 // showText-rotateAngle
- << 0 << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 0 << false << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 102 -d '1234' --dmre --vers=8"
<< "zint.exe -b 102 -d \"1234\" --dmre --vers=8"
@@ -1024,7 +1085,7 @@ private slots:
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
<< true << false << true << false << true << 0 // showText-rotateAngle
- << 0 << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 0 << false << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 106 --binary --cols=4 -d 'TEXT' --height=3.5 --heightperrow --quietzones"
" --rows=10 --scale=10 --secure=3 --structapp=1,2"
@@ -1040,7 +1101,7 @@ private slots:
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
<< true << false << false << false << true << 0 // showText-rotateAngle
- << 0 << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 0 << false << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 89 --compliantheight -d '9212320967145'"
<< "zint.exe -b 89 --compliantheight -d \"9212320967145\""
@@ -1054,7 +1115,7 @@ private slots:
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 0 << 1 << 0 << 0 << 0 // borderTypeIndex-fontSetting
<< true << false << false << false << true << 0 // showText-rotateAngle
- << 0 << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 0 << false << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 89 --border=1 --compliantheight -d '9212320967145'"
<< "zint.exe -b 89 --border=1 --compliantheight -d \"9212320967145\""
@@ -1069,7 +1130,7 @@ private slots:
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
<< true << false << true << false << true << 0 // showText-rotateAngle
- << 0 << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 0 << false << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 57 -d '1Z00004951\\GUPSN\\G06X610\\G159\\G1234567\\G1/1\\G\\GY\\G1 MAIN ST\\GTOWN\\GNY\\R\\E'"
" --esc --primary='152382802840001' --quietzones --scale=2.5 --scmvv=96"
@@ -1085,7 +1146,7 @@ private slots:
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
<< true << false << false << false << true << 0 // showText-rotateAngle
- << 0 << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 0 << false << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 97 -d '1234' --fullmultibyte --mask=3 --secure=2 --vers=3"
<< "zint.exe -b 97 -d \"1234\" --fullmultibyte --mask=3 --secure=2 --vers=3"
@@ -1099,11 +1160,11 @@ private slots:
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
<< true << false << true << false << true << 0 // showText-rotateAngle
- << 0 << true << true << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 0 << true << true << false << false << false << false << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
- << "zint -b 58 -d '(01)12' --fullmultibyte --gs1 --gs1parens --gs1nocheck --mask=0 --quietzones"
+ << "zint -b 58 -d '(01)12' --fullmultibyte --gs1parens --gs1nocheck --mask=0 --quietzones"
" --secure=1 --vers=5"
- << "zint.exe -b 58 -d \"(01)12\" --fullmultibyte --gs1 --gs1parens --gs1nocheck --mask=0 --quietzones"
+ << "zint.exe -b 58 -d \"(01)12\" --fullmultibyte --gs1parens --gs1nocheck --mask=0 --quietzones"
" --secure=1 --vers=5"
<< "" << "" << "" << "";
@@ -1115,7 +1176,7 @@ private slots:
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
<< true << false << false << false << true << 180 // showText-rotateAngle
- << 20 << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 20 << false << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 145 --eci=20 -d 'テ' --rotate=180 --vers=8"
<< "zint.exe -b 145 --eci=20 -d \"テ\" --rotate=180 --vers=8"
@@ -1129,10 +1190,10 @@ private slots:
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 0 << 0 << 0 << 0 << 0 // borderTypeIndex-fontSetting
<< true << false << false << false << true << 0 // showText-rotateAngle
- << 0 << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 0 << false << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
- << "zint -b 144 -d '(01)1' --gs1 --gs1parens --gs1nocheck --secure=6 --structapp='1,2,4' --vers=2"
- << "zint.exe -b 144 -d \"(01)1\" --gs1 --gs1parens --gs1nocheck --secure=6 --structapp=\"1,2,4\" --vers=2"
+ << "zint -b 144 -d '(01)1' --gs1parens --gs1nocheck --secure=6 --structapp='1,2,4' --vers=2"
+ << "zint.exe -b 144 -d \"(01)1\" --gs1parens --gs1nocheck --secure=6 --structapp=\"1,2,4\" --vers=2"
<< "" << "" << "" << "";
QTest::newRow("BARCODE_UPCE_CC") << true << 0.0f << "out.svg"
@@ -1143,7 +1204,7 @@ private slots:
<< "" << "" << QColor(0xEF, 0x29, 0x29) << QColor(Qt::white) << false // fgStr-cmyk
<< 0 << 0 << 0 << 0 << (BOLD_TEXT | SMALL_TEXT) // borderTypeIndex-fontSetting
<< true << false << false << true << true << 0 // showText-rotateAngle
- << 0 << false << false << false << false << false << WARN_FAIL_ALL << false // eci-debug
+ << 0 << false << false << false << false << false << false << WARN_FAIL_ALL << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 136 --compliantheight -d '[11]901222[99]ABCDE' --fg=EF2929 --guarddescent=6.5"
" --noquietzones -o 'out.svg' --primary='12345670+1234' --small --werror"
@@ -1165,7 +1226,7 @@ private slots:
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 0 << 0 << 0 << 0 << (BOLD_TEXT | SMALL_TEXT) // borderTypeIndex-fontSetting
<< true << false << false << false << true << 0 // showText-rotateAngle
- << 0 << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 0 << false << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 73 --bold -d '12345678701234567' --height=20 --small --textgap=1.2 --vers=1"
<< "zint.exe -b 73 --bold -d \"12345678701234567\" --height=20 --small --textgap=1.2 --vers=1"
@@ -1179,7 +1240,7 @@ private slots:
<< "" << "" << QColor(Qt::black) << QColor(Qt::white) << false // fgStr-cmyk
<< 0 << 0 << 0 << 0 << (BOLD_TEXT | SMALL_TEXT) // borderTypeIndex-fontSetting
<< false << false << false << false << true << 0 // showText-rotateAngle
- << 0 << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
+ << 0 << false << false << false << false << false << false << WARN_DEFAULT << false // eci-debug
<< 0.0 << 0 << 0 << 0 << 0 << 0 // xdimdp
<< "zint -b 73 -d '12345678701234567' --height=20 --notext --vers=1"
<< "zint.exe -b 73 -d \"12345678701234567\" --height=20 --notext --vers=1"
@@ -1232,6 +1293,7 @@ private slots:
QFETCH(int, eci);
QFETCH(bool, gs1Parens);
QFETCH(bool, gs1NoCheck);
+ QFETCH(bool, gs1SyntaxEngine);
QFETCH(bool, readerInit);
QFETCH(bool, guardWhitespace);
QFETCH(bool, embedVectorFont);
@@ -1296,6 +1358,7 @@ private slots:
bc.setECIValue(eci);
bc.setGS1Parens(gs1Parens);
bc.setGS1NoCheck(gs1NoCheck);
+ bc.setGS1SyntaxEngine(gs1SyntaxEngine);
bc.setReaderInit(readerInit);
bc.setGuardWhitespace(guardWhitespace);
bc.setEmbedVectorFont(embedVectorFont);
diff --git a/docs/manual.html b/docs/manual.html
index 2d1a5e84..13505c2d 100644
--- a/docs/manual.html
+++ b/docs/manual.html
@@ -2582,12 +2582,14 @@ Modes and ECI below.
GS1 data can be encoded in a number of symbologies. Application
Identifiers (AIs) should be enclosed in [square brackets]
followed by the data to be encoded (see 6.1.10.3
-GS1-128). GS1 Digital Link URIs are also supported. To encode GS1
-data use the --gs1 option. Also recommended is the
---gs1strict option, which verifies the GS1 data. GS1 mode
-is assumed (and doesn’t need to be set) for GS1-128, EAN-14, GS1 DataBar
-and GS1 Composite symbologies but is also available for Aztec Code, Code
-16K, Code 49, Code One, Data Matrix, DotCode, QR Code and Ultracode.
+GS1-128). For matrix symbologies, GS1 Digital Link URIs are also
+supported. To encode GS1 data use the --gs1 option.
+Alternatively, use the --gs1strict option, which strictly
+verifies the GS1 data.
+GS1 mode is assumed (and doesn’t need to be set) for GS1-128, EAN-14,
+GS1 DataBar and GS1 Composite symbologies but is also available for
+Aztec Code, Code 16K, Code 49, Code One, Data Matrix, DotCode, QR Code
+and Ultracode.
Health Industry Barcode (HIBC) data may also be encoded in the
symbologies Aztec Code, Codablock-F, Code 128, Code 39, Data Matrix,
MicroPDF417, PDF417 and QR Code. Within this mode, the leading
@@ -4052,7 +4054,7 @@ sequences.
GS1PARENS_MODE |
Parentheses (round brackets) used in GS1
data instead of square brackets to delimit Application Identifiers
-(parentheses in the data must be escaped). |
+(opening parentheses in the data must be escaped).
GS1NOCHECK_MODE |
@@ -5097,9 +5099,9 @@ data without escaping.
For compatibility with data entry in other systems, the option
--gs1parens (API input_mode |= GS1PARENS_MODE)
may be used to signal that AIs are encased in parentheses. If there are
-any parentheses in the AI data, they must be escaped with a backslash
-(\( or \)) and the option --esc
-(API input_mode |= ESCAPE_MODE) selected.
+any opening parentheses in the AI data, they must be escaped with a
+backslash (\(). Optionally, for clarity, closing
+parentheses may also be escaped,
Fixed length data should be entered at the appropriate length for
correct encoding. GS1-128 does not support extended ASCII (ISO/IEC
8859-1) characters. Check digits for GTIN data AI (01) are not generated
@@ -9213,23 +9215,27 @@ non-ASCII data.
Treat input as GS1 compatible data. Application Identifiers (AIs)
should be placed in square brackets "[]" (but see
---gs1parens).
+--gs1parens). Also accepts GS1 Digital Link URIs
+(unverified) for matrix symbologies.
--gs1nocheck
-Do not check the validity of GS1 data.
+Treat input as GS1 compatible data (as --gs1) but do not
+check the validity of the data.
--gs1parens
-Process parentheses "()" as GS1 AI delimiters, rather
-than square brackets "[]". If the AI data contains
-parentheses, they must be backslashed ("\(" or
-"\)") and the --esc option selected.
+Treat input as GS1 compatible data (as --gs1) but
+process parentheses "()" as GS1 AI delimiters, rather than
+square brackets "[]". If the AI data contains opening
+parentheses, they must be backslashed ("\(").
--gs1strict
-Uses the GS1 Syntax Engine (if available) to strictly verify GS1
-data. Ignored if --gs1nocheck also given.
+Treat input as GS1 compatible data (as --gs1) and use
+the GS1 Syntax Engine (if available) to strictly verify the GS1 data,
+including GS1 Digital Link URIs. Ignored if --gs1nocheck
+also given.
--gssep
diff --git a/docs/manual.pmd b/docs/manual.pmd
index aa891699..3633f206 100644
--- a/docs/manual.pmd
+++ b/docs/manual.pmd
@@ -1280,12 +1280,13 @@ Interpretations) mechanism to encode the data if the symbology supports it - see
GS1 data can be encoded in a number of symbologies. Application Identifiers
(AIs) should be enclosed in `[square brackets]` followed by the data to be
-encoded (see [6.1.10.3 GS1-128]). GS1 Digital Link URIs are also supported. To
-encode GS1 data use the `--gs1` option. Also recommended is the `--gs1strict`
-option, which verifies the GS1 data. GS1 mode is assumed (and doesn't need to be
-set) for GS1-128, EAN-14, GS1 DataBar and GS1 Composite symbologies but is also
-available for Aztec Code, Code 16K, Code 49, Code One, Data Matrix, DotCode, QR
-Code and Ultracode.
+encoded (see [6.1.10.3 GS1-128]). For matrix symbologies, GS1 Digital Link URIs
+are also supported. To encode GS1 data use the `--gs1` option. Alternatively,
+use the `--gs1strict` option, which strictly verifies the GS1 data.
+
+GS1 mode is assumed (and doesn't need to be set) for GS1-128, EAN-14, GS1
+DataBar and GS1 Composite symbologies but is also available for Aztec Code, Code
+16K, Code 49, Code One, Data Matrix, DotCode, QR Code and Ultracode.
Health Industry Barcode (HIBC) data may also be encoded in the symbologies Aztec
Code, Codablock-F, Code 128, Code 39, Data Matrix, MicroPDF417, PDF417 and QR
@@ -2393,7 +2394,7 @@ Value Effect
`GS1PARENS_MODE` Parentheses (round brackets) used in GS1 data instead
of square brackets to delimit Application Identifiers
- (parentheses in the data must be escaped).
+ (opening parentheses in the data must be escaped).
`GS1NOCHECK_MODE` Do not check GS1 data for validity, i.e. suppress
checks for valid AIs and data lengths. Invalid
@@ -3355,9 +3356,9 @@ inclusion of parentheses in the AI data without escaping.
For compatibility with data entry in other systems, the option `--gs1parens`
(API `input_mode |= GS1PARENS_MODE`) may be used to signal that AIs are encased
-in parentheses. If there are any parentheses in the AI data, they must be
-escaped with a backslash (`\(` or `\)`) and the option `--esc` (API `input_mode
-|= ESCAPE_MODE`) selected.
+in parentheses. If there are any opening parentheses in the AI data, they must
+be escaped with a backslash (`\(`). Optionally, for clarity, closing parentheses
+may also be escaped,
Fixed length data should be entered at the appropriate length for correct
encoding. GS1-128 does not support extended ASCII (ISO/IEC 8859-1) characters.
diff --git a/docs/manual.txt b/docs/manual.txt
index 5acdc4c1..f8338eaa 100644
--- a/docs/manual.txt
+++ b/docs/manual.txt
@@ -1353,12 +1353,13 @@ Interpretations) mechanism to encode the data if the symbology supports it - see
GS1 data can be encoded in a number of symbologies. Application Identifiers
(AIs) should be enclosed in [square brackets] followed by the data to be encoded
-(see 6.1.10.3 GS1-128). GS1 Digital Link URIs are also supported. To encode GS1
-data use the --gs1 option. Also recommended is the --gs1strict option, which
-verifies the GS1 data. GS1 mode is assumed (and doesn’t need to be set) for
-GS1-128, EAN-14, GS1 DataBar and GS1 Composite symbologies but is also available
-for Aztec Code, Code 16K, Code 49, Code One, Data Matrix, DotCode, QR Code and
-Ultracode.
+(see 6.1.10.3 GS1-128). For matrix symbologies, GS1 Digital Link URIs are also
+supported. To encode GS1 data use the --gs1 option. Alternatively, use the
+--gs1strict option, which strictly verifies the GS1 data.
+
+GS1 mode is assumed (and doesn’t need to be set) for GS1-128, EAN-14, GS1
+DataBar and GS1 Composite symbologies but is also available for Aztec Code, Code
+16K, Code 49, Code One, Data Matrix, DotCode, QR Code and Ultracode.
Health Industry Barcode (HIBC) data may also be encoded in the symbologies Aztec
Code, Codablock-F, Code 128, Code 39, Data Matrix, MicroPDF417, PDF417 and QR
@@ -2368,7 +2369,7 @@ member. Valid values are shown in the table below.
GS1PARENS_MODE Parentheses (round brackets) used in GS1 data instead
of square brackets to delimit Application Identifiers
- (parentheses in the data must be escaped).
+ (opening parentheses in the data must be escaped).
GS1NOCHECK_MODE Do not check GS1 data for validity, i.e. suppress
checks for valid AIs and data lengths. Invalid
@@ -3226,9 +3227,9 @@ inclusion of parentheses in the AI data without escaping.
For compatibility with data entry in other systems, the option --gs1parens (API
input_mode |= GS1PARENS_MODE) may be used to signal that AIs are encased in
-parentheses. If there are any parentheses in the AI data, they must be escaped
-with a backslash (\( or \)) and the option --esc (API input_mode |= ESCAPE_MODE)
-selected.
+parentheses. If there are any opening parentheses in the AI data, they must be
+escaped with a backslash (\(). Optionally, for clarity, closing parentheses may
+also be escaped,
Fixed length data should be entered at the appropriate length for correct
encoding. GS1-128 does not support extended ASCII (ISO/IEC 8859-1) characters.
@@ -5259,22 +5260,25 @@ OPTIONS
--gs1
Treat input as GS1 compatible data. Application Identifiers (AIs) should be
- placed in square brackets "[]" (but see --gs1parens).
+ placed in square brackets "[]" (but see --gs1parens). Also accepts GS1
+ Digital Link URIs (unverified) for matrix symbologies.
--gs1nocheck
- Do not check the validity of GS1 data.
+ Treat input as GS1 compatible data (as --gs1) but do not check the validity
+ of the data.
--gs1parens
- Process parentheses "()" as GS1 AI delimiters, rather than square brackets
- "[]". If the AI data contains parentheses, they must be backslashed ("\(" or
- "\)") and the --esc option selected.
+ Treat input as GS1 compatible data (as --gs1) but process parentheses "()"
+ as GS1 AI delimiters, rather than square brackets "[]". If the AI data
+ contains opening parentheses, they must be backslashed ("\(").
--gs1strict
- Uses the GS1 Syntax Engine (if available) to strictly verify GS1 data.
- Ignored if --gs1nocheck also given.
+ Treat input as GS1 compatible data (as --gs1) and use the GS1 Syntax Engine
+ (if available) to strictly verify the GS1 data, including GS1 Digital Link
+ URIs. Ignored if --gs1nocheck also given.
--gssep
diff --git a/docs/zint.1 b/docs/zint.1
index 6b5c4c70..25936256 100644
--- a/docs/zint.1
+++ b/docs/zint.1
@@ -231,19 +231,23 @@ non\-ASCII data.
Treat input as GS1 compatible data.
Application Identifiers (AIs) should be placed in square brackets
\f[CR]\(dq[]\(dq\f[R] (but see \f[CR]\-\-gs1parens\f[R]).
+Also accepts GS1 Digital Link URIs (unverified) for matrix symbologies.
.TP
\f[CR]\-\-gs1nocheck\f[R]
-Do not check the validity of GS1 data.
+Treat input as GS1 compatible data (as \f[CR]\-\-gs1\f[R]) but do not
+check the validity of the data.
.TP
\f[CR]\-\-gs1parens\f[R]
-Process parentheses \f[CR]\(dq()\(dq\f[R] as GS1 AI delimiters, rather
-than square brackets \f[CR]\(dq[]\(dq\f[R].
-If the AI data contains parentheses, they must be backslashed
-(\f[CR]\(dq\(rs(\(dq\f[R] or \f[CR]\(dq\(rs)\(dq\f[R]) and the
-\f[CR]\-\-esc\f[R] option selected.
+Treat input as GS1 compatible data (as \f[CR]\-\-gs1\f[R]) but process
+parentheses \f[CR]\(dq()\(dq\f[R] as GS1 AI delimiters, rather than
+square brackets \f[CR]\(dq[]\(dq\f[R].
+If the AI data contains opening parentheses, they must be backslashed
+(\f[CR]\(dq\(rs(\(dq\f[R]).
.TP
\f[CR]\-\-gs1strict\f[R]
-Uses the GS1 Syntax Engine (if available) to strictly verify GS1 data.
+Treat input as GS1 compatible data (as \f[CR]\-\-gs1\f[R]) and use the
+GS1 Syntax Engine (if available) to strictly verify the GS1 data,
+including GS1 Digital Link URIs.
Ignored if \f[CR]\-\-gs1nocheck\f[R] also given.
.TP
\f[CR]\-\-gssep\f[R]
diff --git a/docs/zint.1.pmd b/docs/zint.1.pmd
index 5734f6f3..fbe19d07 100644
--- a/docs/zint.1.pmd
+++ b/docs/zint.1.pmd
@@ -204,20 +204,21 @@ Paintbrush (`PCX`), Portable Network Format (`PNG`), Scalable Vector Graphic (`S
`--gs1`
: Treat input as GS1 compatible data. Application Identifiers (AIs) should be placed in square brackets `"[]"` (but
- see `--gs1parens`).
+ see `--gs1parens`). Also accepts GS1 Digital Link URIs (unverified) for matrix symbologies.
`--gs1nocheck`
-: Do not check the validity of GS1 data.
+: Treat input as GS1 compatible data (as `--gs1`) but do not check the validity of the data.
`--gs1parens`
-: Process parentheses `"()"` as GS1 AI delimiters, rather than square brackets `"[]"`. If the AI data contains
- parentheses, they must be backslashed (`"\("` or `"\)"`) and the `--esc` option selected.
+: Treat input as GS1 compatible data (as `--gs1`) but process parentheses `"()"` as GS1 AI delimiters, rather than
+ square brackets `"[]"`. If the AI data contains opening parentheses, they must be backslashed (`"\("`).
`--gs1strict`
-: Uses the GS1 Syntax Engine (if available) to strictly verify GS1 data. Ignored if `--gs1nocheck` also given.
+: Treat input as GS1 compatible data (as `--gs1`) and use the GS1 Syntax Engine (if available) to strictly verify
+ the GS1 data, including GS1 Digital Link URIs. Ignored if `--gs1nocheck` also given.
`--gssep`
diff --git a/frontend/main.c b/frontend/main.c
index 175b5438..231baaaa 100644
--- a/frontend/main.c
+++ b/frontend/main.c
@@ -1738,12 +1738,15 @@ int main(int argc, char **argv) {
break;
case OPT_GS1NOCHECK:
my_symbol->input_mode |= GS1NOCHECK_MODE;
+ my_symbol->input_mode = (my_symbol->input_mode & ~0x07) | GS1_MODE; /* Now sets GS1_MODE also */
break;
case OPT_GS1PARENS:
my_symbol->input_mode |= GS1PARENS_MODE;
+ my_symbol->input_mode = (my_symbol->input_mode & ~0x07) | GS1_MODE; /* Now sets GS1_MODE also */
break;
case OPT_GS1STRICT:
my_symbol->input_mode |= GS1SYNTAXENGINE_MODE;
+ my_symbol->input_mode = (my_symbol->input_mode & ~0x07) | GS1_MODE; /* Now sets GS1_MODE also */
break;
case OPT_GSSEP:
my_symbol->output_options |= GS1_GS_SEPARATOR;
diff --git a/frontend_qt/mainwindow.cpp b/frontend_qt/mainwindow.cpp
index 3befb67e..a59d420b 100644
--- a/frontend_qt/mainwindow.cpp
+++ b/frontend_qt/mainwindow.cpp
@@ -3360,9 +3360,7 @@ void MainWindow::update_preview()
btnClearData->setEnabled(!txtData->text().isEmpty());
chkGS1Parens->setEnabled(m_bc.bc.takesGS1AIData(m_symbology) || (m_bc.bc.inputMode() & 0x07) == GS1_MODE);
chkGS1NoCheck->setEnabled(chkGS1Parens->isEnabled());
- if (chkGS1Strict->isVisible()) {
- chkGS1Strict->setEnabled(chkGS1Parens->isEnabled() && !chkGS1NoCheck->isChecked());
- }
+ chkGS1Strict->setEnabled(chkGS1Parens->isEnabled() && !chkGS1NoCheck->isChecked());
chkRInit->setEnabled(m_bc.bc.supportsReaderInit() && (m_bc.bc.inputMode() & 0x07) != GS1_MODE);
chkCompliantHeight->setEnabled(m_bc.bc.hasCompliantHeight());
diff --git a/win32/README b/win32/README
index 932f6122..e3418b47 100644
--- a/win32/README
+++ b/win32/README
@@ -46,6 +46,7 @@ and then lpng:
and then gs1encoders:
cd gs1-syntax-engine\src\c-lib
+ nmake -f makefile.vcwin32 clean
nmake -f makefile.vcwin32
cd ..\..\..
@@ -133,26 +134,17 @@ The following example uses Visual Studio 2019 to build for x86/Win32:
As above, follow the steps to build zlib, lpng and gs1encoders.
-CMake needs to be able to find zlib, lpng and gs1encoders. One way to do this
-(requires Administrator privileges) is to create two sub-directories in
-"C:\Program Files (x86)" called "include" and "lib", and then copy:
-
- for %I in (zlib\zlib.h zlib\zconf.h lpng\png.h lpng\pngconf.h ^
- lpng\pnglibconf.h gs1-syntax-engine\src\c-lib\gs1encoders.h) ^
- do copy %I "C:\Program Files (x86)\include"
- for %I in (zlib\zlib.lib lpng\libpng.lib ^
- gs1-syntax-engine\src\c-lib\gs1encoders.lib) ^
- do copy %I "C:\Program Files (x86)\lib"
-
This example uses Qt 5.15.2 and component "MSVC 2019 32-bit" so install them and
add to path (your path may differ):
set "PATH=C:\Qt\5.15.2\msvc2019\bin;%PATH%"
-Now build zint:
+Now build zint, passing the locations zlib, lpng and gs1encoders:
cd zint
- cmake -G "Visual Studio 16 2019" -A Win32 -DCMAKE_BUILD_TYPE=Release -B build
+ cmake -G "Visual Studio 16 2019" -A Win32 -DCMAKE_BUILD_TYPE=Release -B build^
+ -DZLIB_ROOT="%cd%\..\zlib" -DPNG_ROOT="%cd%\..\lpng"^
+ -DGS1SE_PATH="%cd%\..\gs1-syntax-engine\src\c-lib"
cmake --build build --config Release
cd ..
@@ -166,11 +158,15 @@ Note that the program name for Zint Studio when built using CMake is not
"qtZint.exe" but "zint-qt.exe".
For MSVC 2015 32-bit, MSVC 2017 32-bit and MSVC 2022 32-bit, the zint cmake
-equivalents are:
+equivalents are (include the library locations as above):
- cmake -G "Visual Studio 14 2015" -DCMAKE_BUILD_TYPE=Release -B build
- cmake -G "Visual Studio 15 2017" -DCMAKE_BUILD_TYPE=Release -B build
- cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_BUILD_TYPE=Release -B build
+ cmake -G "Visual Studio 14 2015" -DCMAKE_BUILD_TYPE=Release -B build^
+ cmake -G "Visual Studio 15 2017" -DCMAKE_BUILD_TYPE=Release -B build^
+ cmake -G "Visual Studio 17 2022" -A Win32 -DCMAKE_BUILD_TYPE=Release -B build^
+
+To build as 64-bit, open an "x64 Native Tools" Command Prompt and follow the
+same instructions, using "MSVC 2019 64-bit" (or "MSVC 2022 64-bit") as the Qt
+component and dropping "-A Win32" from the "cmake -G" invocation if present.
Visual C++ 6