FAQ TBarCode DLL / TBarCode Library
Encoding Kanji Characters in QR Code® Compaction Mode
Encoding Kanji Characters in QR Code® Compaction Mode
Data for QR-Code can be treated either as a sequence of Bytes or as a sequence of SHIFT JIS characters.
Beside SHIFT JIS so-called “ECIs” can be used to switch to different Code-Pages - but ECIs are often unsupported by decoder software.
The default character set of QR-Code is Shift JIS. In order to use the QR-Code Kanji Compaction Mode (more efficient), the input for the encoder must be in a specific character set:
TBarCode DLL V7, TBarCode/X Library Version 7
Input must be in Multi Byte Character Set Format SHIFT JIS (not UTF-8, not Unicode!).
- Single Bytes characters are encoded according to JIS X 0201.
- Double Byte characters are encoded according to Shift JIS X 0208.
TBarCode DLL V8, TBarCode/X Library Version 8 (and later)
Input must be in Unicode (UTF-16 in Windows Version and UTF-32/UCS-4 in Linux/UNIX Version).
Double Byte characters contained in the Shift JIS X 0208-1990 table can be compacted in QR-Code 13-Bit Mode. To enable the compaction in the TBarCode Library you have to call the function
BCSet_QR_KanjiChineseCompaction (pBarcode, eQRMBCompactionKanji)
Here are some links to background information about Kanji and Unicode: