brasizza / sunmi_printer

BSD 3-Clause "New" or "Revised" License
38 stars 45 forks source link

How can I print unicode? Korean is not printable. #51

Closed chanjungkim closed 7 months ago

chanjungkim commented 1 year ago

I tested with

Future<List<int>> customEscPos() async {
  final profile = await CapabilityProfile.load();
  final generator = Generator(PaperSize.mm58, profile);
  List<int> bytes = [];

  bytes += generator.text(
      'Regular: aA bB cC dD eE fF gG hH iI jJ kK lL mM nN oO pP qQ rR sS tT uU vV wW xX yY zZ');
...

This is printable.

Future<List<int>> customEscPos() async {
  final profile = await CapabilityProfile.load();
  final generator = Generator(PaperSize.mm58, profile);
  List<int> bytes = [];

  bytes += generator.text(
      'Regular: aA bB cC dD eE fF gG hH iI jJ kK lL mM nN oO pP qQ rR sS tT uU vV wW xX yY zZ 안녕');
...

is not printable.

Do you support unicode?

I tested with PosStyles(codeTable: 'CP850') and also PosStyles(codeTable: 'CP1252') and CP928, CP858, CP874, CP864. But all of them didn't work.

Screen Shot 2023-02-17 at 4 57 58 PM

brasizza commented 1 year ago

Hey @chanjungkim , esc/pos is not the package that i maintain, you can try de print text from the sunmi to see if can print as well.