Skip to content

Han Xin Code

Terry Burton edited this page Nov 1, 2026 · 15 revisions

Han Xin Code

The Han Xin Code symbology is a 2D matrix-style barcode symbology that can encode any byte values.

Also known as: Chinese Sensible.

Uses:

  • Applications in China, particularly those that encode Chinese text.

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

Data and Options

  • The data field can contain any byte values. The default interpretation of data by readers is in accordance with ISO/IEC 8859-1. When supported by the receiver, characters from other code pages can be encoded using Extended Channel Interpretation (ECI), for example ^ECI000032 for GB 18030.
  • 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 byte value, useful for specifying unprintable characters.
  • When the parsefnc option is specified, non-data function characters can be specified by escape sequences:
    • ^FNC1: FNC1
    • ^ECI000000 to ^ECI999999: ECI indicators
    • An FNC1 in the first position of the data selects GS1 mode, in which any further FNC1 separates the element strings. Outside GS1 mode, FNC1 cannot appear.
    • ECIs are not available with FNC1 in first position.
  • 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