0

I facing an issue with C#.net code to print Arabic characters on bixolon printer spp r300.

I tried the following code but not it doesn't work, just printing question marks “?” instead of arabic characters. For English characters, it works fine.

BxlPrint.SetInterChrSet(BxlPrint.BXL_CS_WPC1256);

    BxlPrint.SetCharacterSet(BxlPrint.BXL_CS_WPC1256);
    BxlPrint.PrintText("واحد القبول صحة", BxlPrint.BXL_ALIGNMENT_CENTER, BxlPrint.BXL_FT_DEFAULT,
    BxlPrint.BXL_TS_0WIDTH | BxlPrint.BXL_TS_0HEIGHT);
theoretisch
  • 1,718
  • 5
  • 24
  • 34
  • Is the arabic string in UTF-8 form? The bixolon printer expects 8 bit characters according to it's codepage, not UTF-8. – Marc Balmer Jan 02 '17 at 11:53
  • Tried following code by using both Arabic encodings "windows-1256" and "ISO-8859-6", but no luck.... BxlPrint.PrintText(Encoding.GetEncoding("windows-1256").GetString(Encoding.Convert(Encoding.UTF8, Encoding.GetEncoding("windows-1256"), Encoding.UTF8.GetBytes("واحد القبول صحة"))), BxlPrint.BXL_ALIGNMENT_RIGHT, BxlPrint.BXL_FT_DEFAULT,BxlPrint.BXL_TS_0WIDTH | BxlPrint.BXL_TS_0HEIGHT); Thanks in advance. – Sahil Bansal Jan 03 '17 at 08:14
  • What I meant is, that you are likely sending Unicode (UTF-8) characters to the printer, which would not work. So convert from Unicode to ISO-8859-6, tell the printer to use ISO-8859-6 codepage and send the data to the printer. – Marc Balmer Jan 03 '17 at 10:41

0 Answers0