andrey-ushakov / esc_pos_utils

Basic Flutter/Dart classes for ESC/POS printing
BSD 3-Clause "New" or "Revised" License
151 stars 339 forks source link

The Urdu tag is for issues relating to displaying user interfaces and managing data in Udru written language. #137

Open sheri-dal opened 7 months ago

sheri-dal commented 7 months ago

I extract an Urdu text from a web adress. For example, my text is میڈیم کون. But when I print it, I see 'ÙرÙردÛÙ'. How can I print it correctly?

I'm using a printer: Black Copper BC-85AC

I'm currently using:

esc_pos_utils: ^1.1.0 flutter_pos_printer_platform: ^1.0.12 The printer prints English successfully. but when we try to print Urdu, it prints strange characters not the Urdu text.

I tried two ways to send encoded string:

First:

final urduText = utf8.encode('میڈیم کون'); Uint8List uint8List = Uint8List.fromList(urduText); bytes += generator.textEncoded(uint8List);

I use this. But not work.

I'm using a printer: Black Copper BC-85AC I'm currently using:

esc_pos_utils: ^1.1.0 flutter_pos_printer_platform: ^1.0.12 The printer prints English successfully. but when we try to print Urdu, it prints strange characters not the Urdu text.

I tried two ways to send encoded string:

final urtext = utf8.encode('میڈیم کون'); Uint8List uint8List = Uint8List.fromList(urtext);

bytes += generator.textEncoded(uint8List);

I use this. But not work.