Hi there,
I'm currently testing the state of upstream combinations of zint and zxing-cpp
and I would like to report some inconsistencies I found.
For the reproducer you need a recently updated Fedora 42 with gcc packages and dev tooling installed.
I have just updated my 'zintzxingcppdemo' integration demo project.
For a fixed version build it now uses zint 2.16.0 and zxing-cpp 2.3.0.
https://github.com/a3emdot/zintzxingcppdemo/commits/main
Cloning and building the project with the script './ZintZXingCppDemo.sh' (fixed versions) shows 0 failed tests.
But cloning and building the project with the script './ZintZXingCppDemoUpstream.sh' shows 1 failed test.
$ cat /home/user/tmp/zintzxingcppdemo/build/local/src/Testing/Temporary/LastTest.log
Start testing: Dec 22 12:13 CET
----------------------------------------------------------
1/17 Testing: zintzxingcppdemo-test
1/17 Test: zintzxingcppdemo-test
Command: "/home/user/tmp/zintzxingcppdemo/build/local/src/zintzxingcppdemo-test"
Directory: /home/user/tmp/zintzxingcppdemo/build/local/src
"zintzxingcppdemo-test" start time: Dec 22 12:13 CET
Output:
----------------------------------------------------------
0 --- UPCA-00000012345-200
0 --- UPCA-12345678901-200
0 --- UPCA-000000123457-200
0 --- UPCA-123456789012-200
0 --- UPCA_CHK-000000123457-200
0 --- UPCA_CHK-123456789012-200
0 --- GS1_DBAR_OMN-12345678901231-200
0 --- GS1_DBAR_OMNSTK-12345678901231-200
8 of 419 tests failed
...
The tests use only simple data for these barcodes with a given height of 200
https://github.com/a3emdot/zintzxingcppdemo/blob/e025de87460cd88769a2ef289a5401b5f37c66ba/src/main.cpp#L204
https://github.com/a3emdot/zintzxingcppdemo/blob/e025de87460cd88769a2ef289a5401b5f37c66ba/src/main.cpp#L227
I wonder if zint is behind the latest changes in zxing-cpp.
Regards Andre
Is it possible, that those codes are filtered out by "-gs1strict" ?
The first code "0000012345" will probably fail due to a zero company prefix error.
But this does not apply to UPCA. Is there a 2D component?
Hi Harald, no, not in this case, "-gs1strict" isn't being used.
Hi Andre, thanks for checking this.
There were (at least) 2 changes to the way ZXing-C++ returns data (none to do with zint per se!):
So the
zxingFixReadData()function needs to adjusted to allow for these.Regards, Martin
Hi Martin, thanks for posting your insights,
I wonder if it would be possible to let the two projects converge a little bit more,
so my fix functionality isn't needed anymore. Perhaps Axel reads this.
https://github.com/a3emdot/zintzxingcppdemo/blob/e025de87460cd88769a2ef289a5401b5f37c66ba/src/barcode.cpp#L336
and
https://github.com/a3emdot/zintzxingcppdemo/blob/e025de87460cd88769a2ef289a5401b5f37c66ba/src/barcode.cpp#L509
Though I haven't checked yet, what has to be done with the zint symbologies EANX, EANX_CHK and the newly provided symbologies EAN8 and EAN13, and why there is still an UPCA_CHK symbology though the EANX_CHK is now tagged 'legacy'.
I will check with my internal downstream projects what should be done.
But as time permits, I might not get around to it until next month.
Kind regards and happy holidays to both of you,
Andre
I think the ZXing-C++ data return format has settled down and won't be changing much (or very little) in the future. Version 2.4.0 is also pretty imminent which would cement the data return format at least for that release.
Re
EANX_CHKbeing tagged as "legacy" andUPCA_CHKnot, it's becauseEANX_CHKalso acceptedEAN-8, which made it problematic to distinguish input with separator-less add-on data, which was needed by ZXing-C++. SplittingEANXetc. intoEAN13andEAN8also makes everything a lot easier to deal with regarding default data, adding leading zeroes, whether a check digit was present or not and other input format options. Note thatEANXetc. still work as before, so nothing should need to change from a legacy user point of view.Re updating
zxingFixReadData(), I currently deal with interfacing with ZXing-C++ intestUtilZXingCPPCmp()in "backend/tests/testcommon.c", so if you like I could do a basic PR for "zintzxingcppdemo" which would address the above changes.Anyway all the best for the Winter Solstice and New Year season to you too, regards, Martin
Sorry for the noise.
It would be great to use the GS1 demo prefix for any testing, which is 952.
Examples for ISO/IEC 15240:2024:
This avoids conflicts with -gs1strict
Just an idea,
Harald
You're referring to https://www.gs1.org/standards/gs1-style-guide/current-standard#2-Applicable-to-all-GS1-documentation+2-18-GS1-prefix-952-for-examples ?
Thanks, didn't know about it. For internal testing I don't think it matters, but should probably use them in the manual.
Yes, and I am wrong.
The code [01]00000000000000
is not seen as error by -gs1strict.
Strange, I had this discussion with Terry and we first did not accept a 0 GCP...
Sorry,
Harald