Getting Started

Last revision 2026/01/28

This article provides a comprehensive guide on how to load thermal printing paper into a printer and print Chinese characters using ANSI encoding, highlighting the necessary steps, file creation, and encoding considerations to prevent common errors.

The figure below shows how to load thermal printing paper into the printer:

paper into the printer

To print Chinese characters

To print Chinese characters, you need to create a hz.c file:

  1. Create a .txt file.
  2. Change the file suffix to .c.
  3. Open it with Notepad.
  4. Select "Save As" and choose ANSI encoding to save.

Do not open or edit this file with the Arduino IDE, as it will rewrite the file to UTF-8 encoding, causing garbled characters when printing.

The hz.c file should contain a character array for Chinese characters (encoded in GB2312):

const char hz[][32]={
"DFROBOT",           //0
"极趣科技",          //1
"嵌入式热敏打印机",  //2
"arduino开发控制",   //3
"DIY趣味",             //4
"让我们一起共创未来",     //5
"打造我们的DIY世界",    //6
};

Was this article helpful?

TOP