|
| 1 | +<!DOCTYPE html> |
| 2 | +<html> |
| 3 | +<head> |
| 4 | + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| 5 | + <meta name="robots" content="noindex, nofollow" /> |
| 6 | + <title>GS1 AI Standard Format</title> |
| 7 | +<style> |
| 8 | +@import "../manual.css"</style> |
| 9 | +</head> |
| 10 | +<body> |
| 11 | +<h2 id="gs1-application-identifier-standard-format">GS1 Application |
| 12 | +Identifier Standard Format</h2> |
| 13 | +<p>Certain barcode symbologies (including <a href="bwipp-symbologies.html#gs1-128">GS1-128</a>, <a href="bwipp-symbologies.html#gs1-databar-expanded">GS1 DataBar |
| 14 | +Expanded</a>, <a href="bwipp-symbologies.html#gs1-datamatrix">GS1 |
| 15 | +DataMatrix</a>, <a href="bwipp-symbologies.html#gs1-qr-code">GS1 QR |
| 16 | +Code</a> and <a href="bwipp-symbologies.html#gs1-composite-symbols">GS1 |
| 17 | +Composite Symbols</a>) represent standardized GS1 data and require that |
| 18 | +their data field is provided in GS1 Application Identifier standard |
| 19 | +format, consisting of a concatenated string of <em>AIs</em> along with |
| 20 | +their corresponding values.</p> |
| 21 | +<p>The AIs are a set of approximately one hundred two-, three- or |
| 22 | +four-digit prefixes written within parentheses that represent physical |
| 23 | +attributes and business information, e.g.</p> |
| 24 | +<ul> |
| 25 | +<li><em>(00)</em> is an eighteen-digit SSCC.</li> |
| 26 | +<li><em>(01)</em> is a fourteen-digit GTIN.</li> |
| 27 | +<li><em>(403)</em> is a variable-length routing code.</li> |
| 28 | +</ul> |
| 29 | +<p>The following input represents GTIN-14 <em>09521234543213</em>; |
| 30 | +Expiration Date <em>1 January 2010</em>; Batch <em>123ABC</em>; Serial |
| 31 | +<em>1234567890</em>:</p> |
| 32 | +<pre><code>(01)09521234543213(17)100101(10)123ABC(21)1234567890</code></pre> |
| 33 | +<p>Encoders for barcode symbologies that expect data in GS1 Application |
| 34 | +Identifier standard format will take care of parsing the input and |
| 35 | +inserting any necessary <em>FNC1</em> characters to delimit variable |
| 36 | +length fields.</p> |
| 37 | +<pre><code>Input to GS1-based encoder: (01)09521234543213(17)100101(10)123ABC(21)1234567890 |
| 38 | + | |
| 39 | + [ BWIPP encodes barcode message... ] |
| 40 | + | |
| 41 | + V |
| 42 | +Barcode contents: {FNC1}095212345432131710010110123ABC{FNC1}211234567890 |
| 43 | + | |
| 44 | + [ Scanner transfer protocol sends... ] |
| 45 | + | |
| 46 | + V |
| 47 | +Application receives: ]Nm095212345432131710010110123ABC{GS}211234567890 |
| 48 | + |
| 49 | +(Where "]Nm" is the symbology specific AIM Symbology Identifier.)</code></pre> |
| 50 | +<h4 id="encoding-parentheses-within-application-identifier-data-values">Encoding |
| 51 | +parentheses within Application Identifier data values</h4> |
| 52 | +<p>Instances of parentheses, <code>(</code> and <code>)</code>, within |
| 53 | +Application Identifier data values must be escaped using the <a href="bwipp-options.html#parse"><code>parse</code> option</a> as |
| 54 | +<code>^040</code> and <code>^041</code>, respectively.</p> |
| 55 | +<h4 id="gs1-application-identifier-linting">GS1 Application Identifier |
| 56 | +Linting</h4> |
| 57 | +<p>The input is checked against the structural rules for the GS1 |
| 58 | +Application Identifiers, as described in <a href="https://www.linkedin.com/pulse/gs1-application-identifier-syntax-dictionary-terry-burton/">this |
| 59 | +article</a>, unless the <strong>dontlint</strong> option is given. The |
| 60 | +Application Identifier definitions are provided in the <a href="http://www.gs1.org/barcodes-epcrfid-id-keys/gs1-general-specifications">GS1 |
| 61 | +General Specifications</a>.</p> |
| 62 | +<h4 id="use-of-group-separator-character-gs-ascii-29-as-an-ai-separator">Use |
| 63 | +of Group Separator character (GS; ASCII 29) as an AI separator</h4> |
| 64 | +<p>FNC1 is the canonical separator that is used in GS1 symbols when |
| 65 | +encoding Application Identifier based data.</p> |
| 66 | +<p>The transfer protocol for FNC1 characters is defined by the |
| 67 | +fundamental ISO/IEC barcode symbology standards and is not something |
| 68 | +that an application standard can legitimately redefine whilst claiming |
| 69 | +conformance with the fundamental standards.</p> |
| 70 | +<p>Encoding a GS (ASCII value 29) directly within a barcode message is |
| 71 | +incorrect and may lead to larger symbol sizes since they may not be |
| 72 | +encoded as efficiently and FNC1. However, because the transfer protocol |
| 73 | +for barcode scanners converts FNC1 non-data characters in third and |
| 74 | +subsequent characters positions to GS data characters for transmission, |
| 75 | +the host is generally unable to determine whether FNC1 or GS was used in |
| 76 | +the barcode message.</p> |
| 77 | +<p>Because of this ambiguity, the use of GS characters of AI separation |
| 78 | +is tolerated by the GS1 standards, but not encouraged.</p> |
| 79 | +<p>BWIPP will always correctly encode the barcode message using FNC1 |
| 80 | +characters.</p> |
| 81 | +<p>If you wish to do the wrong thing then you can manually encode the |
| 82 | +data and use a general (non-GS1) instance of the encoder, for |
| 83 | +example:</p> |
| 84 | +<p>Instead of auto-encoding with canonical use of FNC1 separators:</p> |
| 85 | +<pre><code>Encoder: GS1 DataMatrix |
| 86 | +Data: (01)09521234543213(17)100101(10)123ABC(21)1234567890 |
| 87 | +Options:</code></pre> |
| 88 | +<p>Manually encode with the non-canonical use of GS separators:</p> |
| 89 | +<pre><code>Encoder: Data Matrix |
| 90 | +Data: ^FNC1095212345432131710010110123ABC^GS211234567890 |
| 91 | +Options: parse parsefnc</code></pre> |
| 92 | +<p>Note however that:</p> |
| 93 | +<ul> |
| 94 | +<li>The rules for encoding Application Identifier based data are |
| 95 | +nuanced. FNC1/GS separators are not merely separators and their |
| 96 | +necessity is unrelated to whether the AIs are fixed or variable length, |
| 97 | +as many sources falsely claim.</li> |
| 98 | +<li>You will not benefit from BWIPP's comprehensive validation of |
| 99 | +AI-based data if you choose to encode data manually rather than let |
| 100 | +BWIPP take care of it.</li> |
| 101 | +</ul> |
| 102 | +</body> |
| 103 | +</html> |
0 commit comments