c# EOT End of transmission character in string

4.3k Views Asked by At

If I have a byte array and it ends with EOT character when I use:

string str = ASCII.Encoding.ASCII.GetString(myByteArray);

If I look the content of string str under visual studio is it normal to see it ends with like this "...\u0004"?

It seems like \u0004 is a Unicode code.

1

There are 1 best solutions below

0
ymdatta On

Yeah what you are doing is fine.

Recently I was solving a problem, in which data was encoded and while decoding the data, there were 3 EOT's at the end of the string.

I guess you are fine with using one EOT.