3

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.

4

2 回答 2

3

每个 GS1 专用条码符号系统(包括 GS1 DataMatrix)的 GS1 应用标准指定用于字段分隔符角色的 FNC1 字符必须解码为 ASCII 29 (GS)。请注意,此类符号中的 FNC1 字符还有其他角色,这些角色的处理方式不同,此答案对此进行了解释。

此答案的“提取”部分解释了如何正确解析 GS1 格式的数据。

于 2015-10-19T12:25:23.833 回答
0

好的,为我解决了。Pydmtx 将 FNC1 返回为“\x1d”,即信息分隔符 3

于 2015-10-18T22:23:38.773 回答