1

In my flutter app, esc_pos_printer package is used to print receipt.

ticket.text('Special 2: (ပြည်ဗံဒါပင်ထက် ) unicode blåbærgrød',
        styles: PosStyles(codeTable: 'CP1252'));

I found the following error while trying to print unicode Burmese words.

[ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: Invalid argument (string): Contains invalid characters.: "Special 2: (ပြည်ဗံဒါပင်ထက် ) unicode blåbærgrød"

ThitSarNL
  • 670
  • 1
  • 8
  • 22

1 Answers1

0

Even though CodePage1252 is supported by ESC/POS, it is in the range of 1-byte code.

The characters you want to print are not included.
Please see the link below.

TOP»POS>TECH.REFERENCE»CHARACTER CODE TABLES FOR TM PRINTER»SINGLE-BYTE CHARACTERS»CODE PAGES»16 [WPC1252]
Page 16 [WPC1252]

If you want to print characters other than those shown in the link above, you can create the entire receipt as one image and output it with the image print function.

Or maybe there is nothing else you can do.

kunif
  • 4,060
  • 2
  • 10
  • 30