Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/338.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 使用Epson T20II收据打印机打印阿拉伯字符_C#_.net_Wpf_Point Of Sale_Epson - Fatal编程技术网

C# 使用Epson T20II收据打印机打印阿拉伯字符

C# 使用Epson T20II收据打印机打印阿拉伯字符,c#,.net,wpf,point-of-sale,epson,C#,.net,Wpf,Point Of Sale,Epson,我正在使用MicrosoftPOSSDK1.12和EpsonOPOSADK1.12.22开发一个带有.NET4.5的WPF桌面POS应用程序 我尝试打印到Epson T20II收据打印机,代码工作正常,但当我尝试打印阿拉伯语字符时,它显示的字符是分开的,而不是像这样串联的:- 正确的短语:مب㶎كهب㶊ي 印刷品:باحكه㶕㶊1610; 我已经将SetupPos中设置的字符设置为997(Unicode)以下是我的代码: string receiptTime = receipt.ReceiptT

我正在使用MicrosoftPOSSDK1.12和EpsonOPOSADK1.12.22开发一个带有.NET4.5的WPF桌面POS应用程序

我尝试打印到Epson T20II收据打印机,代码工作正常,但当我尝试打印阿拉伯语字符时,它显示的字符是分开的,而不是像这样串联的:-

正确的短语:مب㶎كهب㶊ي

印刷品:باحكه㶕㶊1610;

我已经将SetupPos中设置的字符设置为997(Unicode)以下是我的代码:

string receiptTime = receipt.ReceiptTime.ToString("dddd dd/M/yyyy  H:m:s");
printer.PrintNormal(PrinterStation.Receipt, "\u001b|cA" + receiptTime + "\n\n");
//Print items
foreach (ReceiptsItem receiptItem in receipt.ReceiptsItems)
{
    printer.PrintNormal(
        PrinterStation.Receipt, 
        string.Format("{0} X {1} \u001b|rA{2}\n",
            receiptItem.Package.Item.Name, 
            receiptItem.Quantity, receiptItem.Total));
}

printer.PrintNormal(PrinterStation.Receipt, "\n");

//Print the total cost
//\u001b|bC = Bold
//\u001b|uC = Underline
//\u001b|2C = Wide character

printer.PrintNormal(PrinterStation.Receipt, "\u001b|bC"
    + "Total:\u001b|rA" + receipt.TotalWithoutDiscount + "\n");

printer.PrintNormal(PrinterStation.Receipt, "\u001b|bC"
    + "Discount:\u001b|rA" + receipt.DiscountValue + "\n");

printer.PrintNormal(PrinterStation.Receipt, "\u001b|bC"
    + "Net Amount:\u001b|rA" + receipt.TotalPrice + "\n");

printer.PrintNormal(PrinterStation.Receipt, "\u001b|bC" +
    "Customer's Payment:\u001b|rA" + receipt.Paid + "\n");
printer.PrintNormal(PrinterStation.Receipt, "\u001b|bC" +
    "Remaining:\u001b|rA " + receipt.Remaining + "\n\n \u001b|N");

你找到解决这个问题的办法了吗?