Skip to content

Han Xin Code

Terry Burton edited this page Oct 15, 2026 · 12 revisions

Han Xin Code

The Han Xin Code symbology is a 2D matrix-style barcode symbology that can encode full 256 character extended-ASCII.

Also known as: Chinese Sensible.

Standards: GB/T 21049-2007, ISO/IEC 20830.

Data and Options

  • The data field can contain any extended ASCII data. The default interpretation of data by readers is in accordance with ISO/IEC 8859-1.
  • The encoder chooses the shortest encodation of the data among the numeric, text, binary byte and Chinese character modes. Byte pairs and quadruples within the GB 18030 ranges of the Chinese character modes are compacted whatever their interpretation.
  • When the parse option is specified, any instances of ^NNN in the data field are replaced with their equivalent ASCII value, useful for specifying unprintable characters.
  • When the parsefnc option is specified, ^FNC1 in the first position of the data selects GS1 mode, in which further ^FNC1 separate the element strings. Outside GS1 mode, FNC1 cannot appear.
  • The eclevel option is used to specify the error correction level:
    • eclevel=L1 - Lowest
    • eclevel=L2 (default)
    • eclevel=L3
    • eclevel=L4 - Highest
  • The version option is used to specify the size of the symbol, 1 to 84.
  • If unspecified the encoder will select the version of the symbol that is the minimum size to represent the given data at the selected error correction level.
  • The mask option is used to specify the mask pattern, 1 to 4. If unspecified the encoder selects the best mask.

Examples

A fixed-size symbol with maximum error correction:

Data:    Han Xin Code
Options: version=10 eclevel=L4
Encoder: hanxin


Symbologies Reference

Point of Sale

GS1 DataBar

Supply Chain

Two-dimensional Symbols

One-dimensional Symbols

Postal Symbols

Pharmaceutical Symbols

Less-used Symbols

GS1 Composite Symbols

Raw Symbols

Partial Symbols

Clone this wiki locally