У меня тюркский sh Проблема с символом c#. Я использую термопринтер Palmx (Zijang) ZJ8330. Кто-нибудь может мне помочь?
Мой код:
string tempFile = "C:\\deneme.txt";
string PrinterName = "POS-80";
StreamReader SR = new StreamReader(tempFile, Encoding.Default);
string all = SR.ReadToEnd();
SR.Close();
all += newLine;
all += " Ürün Adet Tutar";
all += newLine + " ";
all += newLine + " ";
all += ESC + "E";
all += newLine + " ";
all += newLine + " ";
all += newLine + " Mali Değeri Yoktur";
all += newLine + " ";
all += newLine + " Teşekkur ederiz ";
all += newLine + " ";
all += ESC + "@";
all += GS + "V" + (char)1; // Cut receipt
RawPrinterHelper.SendStringToPrinter(PrinterName, all);
А это функция: (я использую RawPrinterHelper)
public static bool SendStringToPrinter(string szPrinterName, string szString)
{
IntPtr pBytes;
Int32 dwCount;
// How many characters are in the string?
dwCount = szString.Length;
// Assume that the printer is expecting ANSI text, and then convert
// the string to ANSI text.
pBytes = Marshal.StringToCoTaskMemAnsi(szString);
// Send the converted ANSI string to the printer.
SendBytesToPrinter(szPrinterName, pBytes, dwCount);
Marshal.FreeCoTaskMem(pBytes);
return true;
}