So I briefly looked into the source code. The default character set used in SambaPOS is 857 (Turkish). C# .Net Printing API is invoked in SerialPortService.cs (Samba.Services.SerialPortService) by
public static void WritePort(string portName, string data)
{
WritePort(portName, Encoding.ASCII.GetBytes(data));
}
and
public static void WritePort(string portName, string data, int codePage)
{
WritePort(portName, Encoding.GetEncoding(codePage).GetBytes(data));
}
The first one calls for ASCII encoding while the second one use specific code page. Since by default notepad saves everything in ANSI, I guess modifying the second function as follows will solve the problem:
public static void WritePort(string portName, string data, int codePage)
{
WritePort(portName, codePage==0?Encoding.Default.GetBytes(data): Encoding.GetEncoding(codePage).GetBytes(data));
}
Then set character set to 0 if one wants to use system default encoding. I will test it tomorrow.