With parenthesised input such as (01)09501101530003(10)ABC, each Application Identifier is
parsed, fixed-length AIs are length-checked, and FNC1 separators are inserted after every
variable-length element that is not last. Input without ( is encoded as one raw run: any ) is
removed and no FNC1 separators are inserted. Element values must
not contain parentheses. GS1 values may legitimately contain them (CSET 82), but this parser
cannot tell them from AI delimiters, so such input is either rejected as malformed
((10)A(B)) or silently split into extra elements ((10)AB(21)CD).
Parameters
data: string
Parenthesised AI input or a raw string of ASCII characters 32-127.
Encodes a GS1-128 symbol.
With parenthesised input such as
(01)09501101530003(10)ABC, each Application Identifier is parsed, fixed-length AIs are length-checked, and FNC1 separators are inserted after every variable-length element that is not last. Input without(is encoded as one raw run: any)is removed and no FNC1 separators are inserted. Element values must not contain parentheses. GS1 values may legitimately contain them (CSET 82), but this parser cannot tell them from AI delimiters, so such input is either rejected as malformed ((10)A(B)) or silently split into extra elements ((10)AB(21)CD).