charset_converter icon indicating copy to clipboard operation
charset_converter copied to clipboard

Doesn't support encoding Arabic text

Open MustafaGamalAbbas opened this issue 4 years ago • 5 comments

MustafaGamalAbbas avatar Sep 02 '20 12:09 MustafaGamalAbbas

Sorry for my late response.

I have checked some signs for ISO-8859-6 and the output seems to be correct. Could you provide any example of not working text or bytes?

pr0gramista avatar Oct 22 '20 14:10 pr0gramista

Uint8List encTxt2 = await CharsetConverter.encode("ISO-8859-6", 'إفتح الصندوق'); ticket.textEncoded(encTxt2, styles: PosStyles(align: PosAlign.right,codeTable: PosCodeTable.arabic));

Arabic is printing. Its characters printing reverse. first characters going last. last characts printing first. Can you please solve this?

mosleh200989 avatar Sep 02 '21 18:09 mosleh200989

I assume this is related with a thermal printer. I saw that there are problems with RTL text on thermal printers. I found this and this which I think leads to using some utility to adapt the printeer for that and some small prefix to the printing methods.

Doesn't seem to be related to charset_converter per se.

If it does could provide me the correct output of await CharsetConverter.encode("ISO-8859-6", 'إفتح الصندوق');

pr0gramista avatar Sep 03 '21 07:09 pr0gramista

I have spent so many days. Finally I found one plugin which is working well. arabic printing perfectly. plugin link

mosleh200989 avatar Sep 07 '21 12:09 mosleh200989

Cool, I'll leave the issue open for reference or additional input.

pr0gramista avatar Sep 07 '21 13:09 pr0gramista