Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does pydtmx or libdtmx return the FNC1 character

Does anyone know what character FNC1 returns as in pydmtx? I'm using pydmtx to read a variety of Datamatrix tags which include variable length elements that I need to parse. Pydmtx is a wrapper for libdmtx, The changelog for libdmtx 0.7.0 says it added reader supports for FNC1. I'd really like to do something like this:

def split_tag(tag_string):    
    FNC1="\u{what_I'm_looking_for}" 
    return string.split(tag_string, FNC1)

Yes, I understand tag elements will include prefixes and fixed length tags will not have a FNC1 between them and will have to be handled separately in my parser.

Alternately if there's a good python opensource library that reads and parses DataMatrix you'll save me about half a day on this module.

like image 430
Empiricist Avatar asked Oct 12 '25 17:10

Empiricist


1 Answers

The GS1 Application Standards for every GS1-specialised barcode symbology (including GS1 DataMatrix) specify that FNC1 characters that are used in a field separator role must be decoded as ASCII 29 (GS). Be aware that there are other roles for FNC1 characters in such symbols that are treated differently which this answer explains.

The "extraction" part of this answer explains how to properly parse GS1-formatted data.

like image 190
Community Avatar answered Oct 14 '25 08:10

Community



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!