更新时间:2022-10-14 21:26:05
这是C#串行端口通信的问题,
您必须将串行端口的编码更改为UTF-8
使用以下代码在C#中设置Encoding ..SerialPort port = new SerialPort(); port.Encoding = System.Text.Encoding.GetEncoding(1252);
Hi,
i am using c#.net from serial port communication in my project, but i am unable to handle hex values greater than 7F, so can i use VC++ for my project.
I don''t think that there is a problem with c# and serial port communication. If you face an issue, there seems to be a problem in your code. If you need advice on how to solve this, please show what you have done so far.
That is the Problem with C# SerialPort Communication,
You have to change the Encoding of your serialport to UTF-8
use the below code to set Encoding.. in C#SerialPort port = new SerialPort(); port.Encoding = System.Text.Encoding.GetEncoding(1252);