pr0gramista / charset_converter

Flutter platform charset converter
BSD 3-Clause "New" or "Revised" License
29 stars 22 forks source link

Doesn't support encoding Arabic text #5

Open MustafaGamalAbbas opened 4 years ago

pr0gramista commented 4 years ago

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?

mosleh200989 commented 3 years ago

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?

pr0gramista commented 3 years ago

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", 'إفتح الصندوق');

mosleh200989 commented 3 years ago

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

pr0gramista commented 3 years ago

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