How to write Chinese / multi-byte characters in ESC/POS?

457 Views Asked by At

I would like to know how to write Chinese / multi-byte characters in ESC/POS.

There is a reference table here: https://reference.epson-biz.com/modules/ref_charcode_en/index.php?content_id=110

And a guide to how to read the table: https://reference.epson-biz.com/modules/ref_charcode_en/index.php?content_id=4

which has this diagram:

table

with the text:

The first column shows the character code of the first character in the row. The first row shows the value to be added for the character code in the column.

However, I am struggling to understand how to read this table, even with this diagram.

For example how do I write this symbol:

enter image description here

It can be found here: https://reference.epson-biz.com/modules/ref_charcode_en/index.php?content_id=111

on the first row on the 2nd column.

the JIS is: 30-20 the S-JIS is: 88-9E and the additional value is: 2

So what is the byte value of the chracter.

1

There are 1 best solutions below

0
On BEST ANSWER

The value of multibyte characters is 16-bit big endian.

In JIS, the code for is 0x3020 + 0x0002, which is 0x3022, and in ShiftJIS, 0x889E + 0x0002, which is 0x88A0.

The byte array is 0x30, 0x22 in JIS and 0x88, 0xA0 in Shift JIS, respectively.


By the way, the table and character code are Japanese, not Chinese.