UTF-8 not work for thai language (Always print chinese characters)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- node.js
- Domain
- embedded-iot
Research direction
Start by reproducing the issue through the escpos.USB device, escpos.Printer options, and the .text("สวัสดี") call shown in the report. Trace how the UTF8 encoding option reaches the printer and compare the emitted data with the printer's Thai character support. Done means Thai text prints as สวัสดี rather than Chinese characters, with a regression check if the project provides one.
Written by the indexing model from the issue text.
Description
I have tried UTF-8 to print the Thai characters but I got Chinese characters instead.
This is my code
const escpos = require("escpos");
escpos.USB = require("escpos-usb");
const device = new escpos.USB();
const options = { encoding: "UTF8" };
const printer = new escpos.Printer(device, options);
device.open(function (error) {
printer
.size(0, 0)
.font("a")
.align("ct")
.style("b")
.text("สวัสดี")
.cut()
.close();
});
This is the result

Expected result
Should print สวัสดี in the paper
How to fix it?
- Dominant language
- TypeScript
- Stars
- 1.6k
- Forks
- 443
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from lsongdev/node-escpos
-
[BUG]: Openbug
Difficulty 4/5 3-5 days Newbie friendliness 15/100
lsongdev/node-escpos#447 ·
-
[BUG]: AJCBOSE Openbug
Difficulty 5/5 Over a week Newbie friendliness 10/100
lsongdev/node-escpos#446 ·
-
Capt Bilal Open
Difficulty 5/5 Over a week Newbie friendliness 1/100
lsongdev/node-escpos#443 ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
lsongdev/node-escpos#442 · 2 reactions ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 38/100
lsongdev/node-escpos#441 · 5 comments · 1 reaction ·
All issues in lsongdev/node-escpos
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
mksglu/context-mode#1200 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
jaegertracing/jaeger-ui#4506 ·
-
area:desktop area:ui bug platform:macos
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
anthropics/claude-code#96687 ·
-
good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
AOSSIE-Org/DebateAI#582 · 2 comments ·