node-escpos icon indicating copy to clipboard operation
node-escpos copied to clipboard

encode arabic letters

Open geekly88 opened this issue 7 years ago • 3 comments

i try to print arabic letters but it always gives me unknown results

like question marks or other depending on type of encode that i pass to .encode function

i try UTF-8 and different types of char encodes

Printer : GP-L80250I

the Code:

'use strict'; var escpos = require('escpos'); var iconv = require('iconv-lite'); var device = new escpos.USB(); var options = { encoding: "UTF-8" /* default */ } const printer = new escpos.Printer(device,options); device.open(function(err){ if(err) throw err; printer.model('qsprinter') .font('a') .align('RT') .size(1, 1) .text('تجربة الترميز') .text(iconv.encode('تجربة الترميز' , 'UTF-8')) .cut() .close() });

geekly88 avatar May 22 '18 19:05 geekly88

Did you solve it ?

danialdezfouli avatar Jun 09 '19 08:06 danialdezfouli

@song940 can you help us in the Arabic encoding issue?

s0bh avatar Jul 07 '20 12:07 s0bh