ascii 128-255 characters
-
hi i like to send ascii character with dec= 205 to my com port, but instade of getting the right character i get I => wrong off cource, how do i get it to be right? this is how i get it done : char ch = (char)205; for the first 127 characters there is no problem, anybody any ideas??? pllzz help
-
hi i like to send ascii character with dec= 205 to my com port, but instade of getting the right character i get I => wrong off cource, how do i get it to be right? this is how i get it done : char ch = (char)205; for the first 127 characters there is no problem, anybody any ideas??? pllzz help
Hi, To send ASCII characters try
char c = 'c';
byte[] b = System.Text.Encoding.ASCII.GetBytes(new char[] { c });
port.Write(b, 0, b.Length);This will work for any character, and GetBytes works for strings too. In order to send a decimal 205, don't use
char
but usebyte
instead.