1

I am developing a mobile app and that app prints invoices from bluetooth printer. So I imported "esc_pos_utils" and "bluetooth_thermal_printer" packages into pubspec.yaml file.

App can print invoices from printer with some Turkish characters like "çÇ" and "öÖ" but when I type other characters like "ıİ","ğĞ","şŞ" an exception thrown in the console like;

E/flutter (31974): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Invalid argument (string): Contains invalid characters.: "FAALİYET RAPORU"
E/flutter (31974): #0      _UnicodeSubsetEncoder.convert (dart:convert/ascii.dart:85:9)
E/flutter (31974): #1      Latin1Codec.encode (dart:convert/latin1.dart:40:46)
E/flutter (31974): #2      Generator._encode (package:esc_pos_utils/src/generator.dart:77:21)
E/flutter (31974): #3      Generator.text (package:esc_pos_utils/src/generator.dart:354:9)

I have tried codeTable:"CP857" and codeTable:"CP1252" in PosStyles() widget but that didn't work.

Have you encountered this situation before?

If you encountered it before and solved,how did you solved this.

0 Answers0