Add support for GS-1 encoding via the FCN1 character #10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch adds the ability to encode GS-1 barcodes using the FNC1
character, which is defined by the new property 'DmtxPropFnc1' and
defaulted to 'DmtxUndefined'. Once set, the specified character
within the text of the barcode will be replaced with FNC1.
GS-1 encoding is valid for all barcode encodings, however FNC1 is
only valid for ASCII and C40/Text. Code will automatically escape to
ASCII where needed and is transparent for user.
An additional patch for dmtxutils is provided, using the command line
parameter '-G xx' allows user to specify the character they wish to
use/replace for FNC1.
Example use - '+' will be replaced FNC1:
$ echo -n '+0010030378123456789017130700103033262+3000017' | dmtxwrite -o test.png -G 43
and decoding replacing FNC1 with '*' (for validation):
Note: FNC1 is implied at the end of fixed length AI's, so is only
required to mark end of variable length AI's.