Search code examples
pythondatamatrix

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.


Solution

  • Okay this solved it for me. Pydmtx returns FNC1 as "\x1d" aka information separator 3