New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arabic ESCPOS Support #304

tresf opened this Issue Apr 7, 2018 · 1 comment


None yet
2 participants

tresf commented Apr 7, 2018

We're adding support for more character sets in ESCPOS by testing -- and documenting various languages but we don't know the status of Arabic.

This is a placeholder to track the progress with printing Arabic, RTL (right-to-left) language. Initial testing has been very poor leaving undesired spaces in between characters. See also mike42/escpos-php#6 which suffered identical problems as we have in our testing.


var config = qz.configs.create("Epson", { encoding: 'CP864' });

// FIXME, this doesn't work!  The UTF-8 can't map to IBM864!
var data = [
   '\x1B' + '\x74' + '\x25', // Setup "codepage 37", which is Epson's IBM864
   'المغلوطة حول استنكار  النشوة وتمجيد الألم نشأت بالفعل، وسأعرض لك التفاصيل لتكتشف حقيقة وأساس تلك السعادة البشرية، فلا أحد يرفض أو يكره أو يتجنب الشعور بالسعادة، ولكن بفضل هؤ.'

qz.print(config, data).catch(function(err) { console.error(err); });

@tresf tresf added the enhancement label Apr 7, 2018

@tresf tresf added this to the 2.0.7 milestone Apr 7, 2018


This comment has been minimized.


tresf commented Jul 9, 2018

Turns out the battle with Arabic isn't the code page but rather the very complex mapping of UTF-8 to the CP864. We've asked @yohanes for help. He's the one that fixed #281 and #155.

More information about the problem is explained here:

Edit: We're making progress! See here: #339

@tresf tresf modified the milestones: 2.0.7, 2.0.8 Jul 9, 2018

@tresf tresf closed this in #339 Aug 6, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment