I need help with my serial port routine. if I send any character above 0x7F it send out the serial port as 0x3F. What am I doing wrong? here's my code
C# |
C# |
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Danatas GerviRank #4,152 · 361 reputationPosted Sep 16, 2009, 4:44 AM EDT
you should use
serialPort1.ReadByte();
not
serialPort1.ReadExisting();
Reason - .ReadExisting(); - converts your bytes to string, based on the encoding....