1
0
mirror of https://git.code.sf.net/p/zint/code synced 2026-05-10 16:13:50 +00:00

RAW_TEXT: expand UPC-A, UPC-E to EAN-13, and EAN-8 if has add-on,

and place any add-on data directly after (no separator)
EAN-8 + add-on: warn as non-compliant (see ZXing-C++ issue #883,
  https://github.com/zxing-cpp/zxing-cpp/issues/883)
test suite: BWIPP: use new EAN-8 + add-on option "permitaddon";
  fix dumps of RAW_TEXT `memcmp()`s fails; various re-formatting
bwipp_dump.ps: update to latest BWIPP
This commit is contained in:
gitlost
2025-04-11 13:02:59 +01:00
parent 182c84fa4d
commit 26805338f8
36 changed files with 1273 additions and 908 deletions

View File

@@ -4343,10 +4343,12 @@ character set the data is in (UTF-8 data will be converted) in
href="#fn16" class="footnote-ref" id="fnref16"
role="doc-noteref"><sup>16</sup></a> and for GS1 data any
<code>FNC1</code> separators will be represented as <code>GS</code>
characters. For EAN/UPC data, add-ons will be separated from the main
data with a plus (<code>+</code>) sign. GS1 Composite data if any will
be separated from the primary data (including any EAN/UPC add-ons) by a
pipe (<code>|</code>) character.</p>
(ASCII 29) characters. UPC-A and UPC-E data will be expanded to EAN-13,
as will EAN-8 but only if it has an add-on (otherwise it will remain at
8 digits), and any add-ons will follow the 13 digits directly (no
separator). GS1 Composite data if any will be separated from the primary
data (including any EAN/UPC add-ons) by a pipe (<code>|</code>)
character.</p>
<h2 id="utf-8-to-eci-convenience-functions">5.17 UTF-8 to ECI
convenience functions</h2>
<p>As a convenience the conversion done by Zint from UTF-8 to ECIs is

View File

@@ -2691,10 +2691,11 @@ The `source`, `length` and `eci` members of `zint_seg` will be set accordingly -
the data in `source`, the data length in `length`, and the character set the
data is in (UTF-8 data will be converted) in `eci`. Any check characters encoded
will be included,[^16] and for GS1 data any `FNC1` separators will be
represented as `GS` characters. For EAN/UPC data, add-ons will be separated from
the main data with a plus (`+`) sign. GS1 Composite data if any will be
separated from the primary data (including any EAN/UPC add-ons) by a pipe (`|`)
character.
represented as `GS` (ASCII 29) characters. UPC-A and UPC-E data will be expanded
to EAN-13, as will EAN-8 but only if it has an add-on (otherwise it will remain
at 8 digits), and any add-ons will follow the 13 digits directly (no separator).
GS1 Composite data if any will be separated from the primary data (including any
EAN/UPC add-ons) by a pipe (`|`) character.
[^15]: DotCode, Han Xin, Micro QR Code, QR Code and UPNQR have variable masks.
Rectangular Micro QR Code has a fixed mask (4).

View File

@@ -2632,9 +2632,11 @@ The source, length and eci members of zint_seg will be set accordingly - the
data in source, the data length in length, and the character set the data is in
(UTF-8 data will be converted) in eci. Any check characters encoded will be
included,[16] and for GS1 data any FNC1 separators will be represented as GS
characters. For EAN/UPC data, add-ons will be separated from the main data with
a plus (+) sign. GS1 Composite data if any will be separated from the primary
data (including any EAN/UPC add-ons) by a pipe (|) character.
(ASCII 29) characters. UPC-A and UPC-E data will be expanded to EAN-13, as will
EAN-8 but only if it has an add-on (otherwise it will remain at 8 digits), and
any add-ons will follow the 13 digits directly (no separator). GS1 Composite
data if any will be separated from the primary data (including any EAN/UPC
add-ons) by a pipe (|) character.
5.17 UTF-8 to ECI convenience functions