Currently when you initialize the printer the default codepage on the constructor is IBM860.
I don't know if this code page is applied to the printer but certainly if you change this codepage does not applied to the printer.
Is used only to encode the data by this codepage.
private void AppendString(string value, bool useLf)
{
if (!string.IsNullOrEmpty(value))
{
if (useLf)
{
value += "\n";
}
List<byte> list = new List<byte>();
if (_buffer != null)
{
list.AddRange(_buffer);
}
byte[] bytes = Encoding.GetEncoding(_codepage).GetBytes(value);
list.AddRange(bytes);
_buffer = list.ToArray();
}
}
Trying to print GREEK using the codepage IBM869 does nothing unless you send the necessary command to the printer
//IBM869
// Alternatively, set code page to CP869 for Greek characters
printer.Append(new byte[] { 0x1B, 0x74, 38 }); // CP869
My suggestion is that the codepage provided to the constructor send the required command to the printer also.
Thanks and hope that will help anyone facing this issue :)
Dear all,
Currently when you initialize the printer the default codepage on the constructor is IBM860. I don't know if this code page is applied to the printer but certainly if you change this codepage does not applied to the printer.
Is used only to encode the data by this codepage.
private void AppendString(string value, bool useLf) { if (!string.IsNullOrEmpty(value)) { if (useLf) { value += "\n"; }
}
Trying to print GREEK using the codepage IBM869 does nothing unless you send the necessary command to the printer //IBM869 // Alternatively, set code page to CP869 for Greek characters printer.Append(new byte[] { 0x1B, 0x74, 38 }); // CP869
My suggestion is that the codepage provided to the constructor send the required command to the printer also.
Thanks and hope that will help anyone facing this issue :)