I want to print a receipt voucher in Arabic, but after printing the words appear in Chinese. I'm using esc_pos_bluetooth package to print via Bluetooth and I followed the steps in package example here . this is the code to print:
Future<Ticket> getReceipt(PaperSize paper) async {
final Ticket ticket = Ticket(paper);
Uint8List encArabic =
await CharsetConverter.encode("windows-1256", "اهلا");
print("encArabic:$encArabic");
ticket.textEncoded(encArabic,
styles: PosStyles(codeTable: PosCodeTable.pc864_1));
final now = DateTime.now();
final formatter = DateFormat('MM/dd/yyyy H:m');
final String timestamp = formatter.format(now);
ticket.text(timestamp,
styles: PosStyles(align: PosAlign.center), linesAfter: 2);
ticket.cut();
return ticket;
}
The word "اهلا" should be printed in Arabic but it appears in Chinese. For the printer that I'm using it was from an unknown company the only thing I knew about it was the model: MHT-29L