^FH - Field Hexadecimal Indicator
Lets the following `^FD` carry bytes as hexadecimal escapes.
^FH lets the next field's data name bytes by their hexadecimal value. That is how
a caret, a tilde, a comma or any byte above 127 reaches field data. ^FH applies
to one field: put it before every ^FD that needs it, not once at the top of
the format.
Syntax
^FHaSupport
Every documented parameter renders the same output Labelary produces.
Labelary renders this command.
Parameters
aEscape characteroptional · single characterCharacter that introduces a two-digit hexadecimal byte in the following ^FD, so _7E gives a literal tilde. Applies to the next field only.
- Default
- _ (underscore)
- Invalid value
- discarded, and the default applies. The character must not be the current command prefix or delimiter, or the field data becomes unparseable.
- Test coverage
- The invalid-value rule is not pinned by a test.
Behavior
Each escape is the indicator and exactly two hexadecimal digits: _5E for ^,
_7E for ~, _2C for a comma, _5F for the underscore itself. The renderer
accepts both cases of a to f. It leaves an indicator followed by anything else
alone, so text with an underscore survives unless the next two characters are hex
digits.
The renderer resolves the escapes before it uses the data, so they work for bar
code content, a ^FB block, or the argument of any command that reads field data.
The guide extends ^FH to ^FV and ^SN as well as ^FD.
Choose the indicator with the data in mind. It must not be the current command
prefix or the parameter delimiter, and Labelary also rejects the lower-case
letters. The default ^FH_, or a symbol such as ^FH*, is the safe choice. A high
byte escape gives the expected character only when ^CI selects the right code
page.
Known issues
Tested behavior
Differences from the specification
Labelary against the ZPL II guide
Where Labelary — our compatibility target — behaves differently from the printed specification.
- Labelary also rejects the lower-case letters
atozas the indicator, where the guide accepts any character that is not a command prefix. — not pinned by a test
Example
A field carrying a literal tilde, caret, comma and underscore, and a second one using a non-default indicator:
^XA
^FO50,30^A0N,30,30^FH^FDList price _7E 12.99 _5E each_2C net^FS
^FO50,80^A0N,30,30^FH*^FD*5FSKU*5F 44*2F71^FS
^XZ
Related commands
^FDField DataSupplies the text or barcode content of the field.^CIChange International Font / EncodingSelects the character encoding of the field data.^CC / ~CCChange CaretChanges the character that introduces a format command.^CT / ~CTChange TildeChanges the character that introduces a control command.